Update selected item color in Pass menu
[ProtonMail-WebClient.git] / packages / pass / store / actions / creators / organization.ts
blob53bcc24b299d557ed067beffc71984b26d1b76dc
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'
9 )({
10     requestId: organizationSettingsRequest,
11     success: {
12         prepare: (payload) => withCache({ payload }),
13         config: { maxAge: 15 * UNIX_MINUTE },
14     },
15     failure: { prepare: (error) => ({ payload: {}, error }) },
16 });