UNPKG

@open-tender/cloud

Version:

A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.

70 lines (69 loc) 3.5 kB
import { AppState } from '../../app'; import { CustomerNotificationPrefs, CustomerNotificationPrefsCreate, NotificationArea, NotificationChannel, RequestError, RequestStatus } from '@open-tender/types'; export interface CustomerCommunicationPrefsState { entities: CustomerNotificationPrefs; error: RequestError; loading: RequestStatus; lookup: { [key: number | string]: number; }; } export declare enum CustomerCommunicationPrefsActionType { FetchCustomerCommunicationPreferences = "customer/fetchCustomerCommunicationPreferences", AddCustomerCommunicationPreference = "customer/addCustomerCommunicationPreference", RemoveCustomerCommunicationPreference = "customer/removeCustomerCommunicationPreference", SetCustomerCommunicationDefaultPreferences = "customer/setCustomerCommunicationDefaultPreferences" } export declare const fetchCustomerCommunicationPreferences: import("@reduxjs/toolkit").AsyncThunk<CustomerNotificationPrefs, void, { state: AppState; rejectValue: RequestError; dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined; extra?: unknown; serializedErrorType?: unknown; pendingMeta?: unknown; fulfilledMeta?: unknown; rejectedMeta?: unknown; }>; export declare const addCustomerCommunicationPreference: import("@reduxjs/toolkit").AsyncThunk<CustomerNotificationPrefs, { area: NotificationArea; channel: NotificationChannel; callback?: (() => void) | undefined; }, { state: AppState; rejectValue: RequestError; dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined; extra?: unknown; serializedErrorType?: unknown; pendingMeta?: unknown; fulfilledMeta?: unknown; rejectedMeta?: unknown; }>; export declare const removeCustomerCommunicationPreference: import("@reduxjs/toolkit").AsyncThunk<CustomerNotificationPrefs, { prefId: number; callback?: (() => void) | undefined; }, { state: AppState; rejectValue: RequestError; dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined; extra?: unknown; serializedErrorType?: unknown; pendingMeta?: unknown; fulfilledMeta?: unknown; rejectedMeta?: unknown; }>; export declare const setCustomerCommunicationDefaultPreferences: import("@reduxjs/toolkit").AsyncThunk<CustomerNotificationPrefs, { prefs: CustomerNotificationPrefsCreate; callback?: (() => void) | undefined; }, { state: AppState; rejectValue: RequestError; dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined; extra?: unknown; serializedErrorType?: unknown; pendingMeta?: unknown; fulfilledMeta?: unknown; rejectedMeta?: unknown; }>; export declare const resetCustomerCommunicationPreferences: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"communicationPreferences/resetCustomerCommunicationPreferences">, resetCustomerCommunicationPreferencesError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"communicationPreferences/resetCustomerCommunicationPreferencesError">, setCustomerCommunicationPreferences: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "communicationPreferences/setCustomerCommunicationPreferences">; export declare const customerCommunicationPrefsReducer: import("redux").Reducer<CustomerCommunicationPrefsState, import("redux").AnyAction>; export declare const selectCustomerCommunicationPreferences: (state: AppState) => CustomerCommunicationPrefsState;