UNPKG

@alloyidentity/web-sdk

Version:

Alloy Web Document SDK

241 lines (240 loc) 6.73 kB
export declare type EvaluationData = { nameFirst?: string; nameLast?: string; addressLine1?: string; addressLine2?: string; addressCity?: string; addressState?: string; addressPostalCode?: string; addressCountryCode?: string; birthDate?: string; phoneNumber?: string; emailAddress?: string; }; declare type DocumentTypes = 'license' | 'passport'; declare type Colors = { primary: string; secondary: string; }; export declare type CustomTheme = { primaryColor?: string; backgroundColor?: string; textColor?: string; borderRadius?: string; iconColor?: string; successColor?: string; errorColor?: string; }; export declare type ComponentOverride = { PrimaryButton?: { default?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; hover?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; focus?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; }; ExitButton?: { default?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; hover?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; focus?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; }; PictureButton?: { default?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; hover?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; focus?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; }; }; SelectorButton?: { default?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; iconColor?: string; }; hover?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; iconColor?: string; }; focus?: { backgroundColor?: string; textColor?: string; borderRadius?: string; border?: string; boxShadow?: string; iconColor?: string; }; }; Header?: { default?: { backgroundColor?: string; textColor?: string; border?: string; boxShadow?: string; borderRadius?: string; }; }; HelpBanner?: { default?: { backgroundColor?: string; textColor?: string; border?: string; boxShadow?: string; borderRadius?: string; iconColor?: string; }; }; PhoneInput?: { default?: { backgroundColor?: string; textColor?: string; border?: string; boxShadow?: string; borderRadius?: string; }; }; }; export declare type CustomStyle = { theme: CustomTheme; componentOverride: ComponentOverride; }; declare type Entity = { entity_type: string; branch_name?: string; data: { [key: string]: any; }; }; export declare type JourneyData = { entities: Entity[]; external_group_id?: string; external_product_id?: string; do_await_additional_entities?: boolean; }; /** * The Init params related to BC only */ export interface BCInit { bcCustomerSessionId: string; bcBrand: string; bcContext: string; bcJsUrl: string; } export declare type BCInitResult = BCInit & { bcCdApi: typeof window.cdApi; }; export declare type InitResult = Init & Partial<BCInitResult>; export declare type Init = { key: string; npmPackageVersion?: string; appUrl?: string; apiUrl?: string; entityToken?: string; externalEntityId?: string; evaluationData?: EvaluationData; production?: boolean; maxEvaluationAttempts?: number; documents?: Array<DocumentTypes | string>; selfie?: boolean; color?: Colors; customStyle?: CustomStyle; customerSlug?: string; forceMobile?: boolean; showHeader?: boolean; validationPreChecks?: boolean; journeyApplicationToken?: string; journeyToken?: string; isSingleEntity?: boolean; socurePublicToken?: string; socureDeviceId?: string; socureDigitalIntelPublicToken?: string; socureSessionToken?: string; socureCustomerSessionId?: string; neuroIdSiteId?: string; neuroUserId?: string; neuroIdFunnel?: string; threatmetrixSessionId?: string; threatmetrixOrgId?: string; iovationBlackboxId?: string; isReactNative?: boolean; isAndroidDevice?: boolean; telemetry?: boolean; } & Partial<BCInit>; export declare type Alloy = { init: (initParam: Init) => Promise<any>; open: (cb: (data: any) => void, anchorElement?: string) => void; close: () => void; createJourneyApplication: (journeyData: any) => Promise<any>; createEvaluation: (data: any) => Promise<any>; getPublicUrl: () => string; }; export interface ClientServices { isNeuroIdEnabled: boolean; neuroIdSiteId: string; isIovationEnabled: boolean; isSocureEnabled: boolean; socurePublicToken: string; isThreatmetrixEnabled: boolean; threatmetrixOrgId: string; isSocureDigitalIntelEnabled: boolean; socureDigitalIntelPublicToken: string; bcBrand: string; bcJsUrl: string; } export {};