1 import { withCache } from '@proton/pass/store/actions/enhancers/cache';
2 import { organizationSettingsRequest } from '@proton/pass/store/actions/requests';
3 import { requestActionsFactory } from '@proton/pass/store/request/flow';
4 import type { OrganizationGetResponse } from '@proton/pass/types';
5 import { UNIX_MINUTE } from '@proton/pass/utils/time/constants';
7 export const getOrganizationSettings = requestActionsFactory<void, OrganizationGetResponse, unknown>(
8 'organization::settings::get'
10 requestId: organizationSettingsRequest,
12 prepare: (payload) => withCache({ payload }),
13 config: { maxAge: 15 * UNIX_MINUTE },
15 failure: { prepare: (error) => ({ payload: {}, error }) },