@commercelayer/react-components
Version:
The Official Commerce Layer React Components
30 lines (29 loc) • 1.98 kB
TypeScript
import type { SetCustomerErrors, deleteCustomerAddress, CustomerState, getCustomerPaymentSources, setCustomerEmail, TCustomerAddress, getCustomerAddresses, getCustomerOrders, getCustomerSubscriptions, setResourceTrigger } from '../reducers/CustomerReducer';
export type InitialCustomerContext = Partial<{
saveCustomerUser: (customerEmail: string) => Promise<void>;
setCustomerErrors: SetCustomerErrors;
setCustomerEmail: typeof setCustomerEmail;
getCustomerPaymentSources: typeof getCustomerPaymentSources;
deleteCustomerAddress: typeof deleteCustomerAddress;
getCustomerAddresses: typeof getCustomerAddresses;
createCustomerAddress: (address: TCustomerAddress) => Promise<void>;
setResourceTrigger: typeof setResourceTrigger;
getCustomerOrders: (props: Partial<Parameters<typeof getCustomerOrders>[0]>) => Promise<void>;
getCustomerSubscriptions: (props: Partial<Parameters<typeof getCustomerSubscriptions>[0]>) => Promise<void>;
reloadCustomerAddresses: () => Promise<void>;
} & CustomerState>;
export declare const defaultCustomerContext: {};
declare const CustomerContext: import("react").Context<Partial<{
saveCustomerUser: (customerEmail: string) => Promise<void>;
setCustomerErrors: SetCustomerErrors;
setCustomerEmail: typeof setCustomerEmail;
getCustomerPaymentSources: typeof getCustomerPaymentSources;
deleteCustomerAddress: typeof deleteCustomerAddress;
getCustomerAddresses: typeof getCustomerAddresses;
createCustomerAddress: (address: TCustomerAddress) => Promise<void>;
setResourceTrigger: typeof setResourceTrigger;
getCustomerOrders: (props: Partial<Parameters<typeof getCustomerOrders>[0]>) => Promise<void>;
getCustomerSubscriptions: (props: Partial<Parameters<typeof getCustomerSubscriptions>[0]>) => Promise<void>;
reloadCustomerAddresses: () => Promise<void>;
} & Partial<import("../reducers/CustomerReducer").CustomerActionPayload>>>;
export default CustomerContext;