UNPKG

@commercelayer/react-components

Version:
36 lines (35 loc) 1.13 kB
type ApplicationType = 'checkout' | 'cart' | 'my-account' | 'identity'; type ApplicationTypeProps<T extends ApplicationType = ApplicationType> = T extends 'my-account' ? { applicationType: T; orderId?: string; modeType?: 'login' | 'signup'; clientId?: string; scope?: string; returnUrl?: string; resetPasswordUrl?: string; } : T extends 'identity' ? { applicationType: T; orderId?: string; modeType: 'login' | 'signup'; clientId: string; scope: string; returnUrl: string; resetPasswordUrl?: string; } : { applicationType: Omit<T, 'my-account' | 'identity'>; orderId: string; modeType?: 'login' | 'signup'; clientId?: string; scope?: string; returnUrl?: string; resetPasswordUrl?: string; }; interface TArgs { accessToken: string; slug: string; domain: string; customDomain?: string; } type Props = ApplicationTypeProps & TArgs; export declare function getApplicationLink({ orderId, accessToken, slug, domain, applicationType, modeType, clientId, scope, returnUrl, resetPasswordUrl, customDomain }: Props): string; export {};