UNPKG

@hauser1993/kyc-sdk

Version:

Your custom version of Ballerine web UI SDK - an open-source infrastructure for user identity and risk management. Compose verification processes for any vertical and geography using modular building blocks, components, and 3rd party integrations.

33 lines 1.34 kB
import { IDocumentVerificationResponse } from '../../utils/event-service'; import { FlowEventType } from './enums'; import { AnyRecord } from '../../../types'; import { TFlowEventBusPayload } from './types'; import { TEventTypes } from '../../utils/event-service/types'; export interface IEventOptions { eventName: string; eventType: TEventTypes; } export interface IFlowCompletePayload extends IEventOptions { payload: IDocumentVerificationResponse; } export interface IFlowExitPayload extends IEventOptions { payload: AnyRecord; } export interface IFlowErrorPayload extends IEventOptions { payload: AnyRecord; } export interface IFlowNavigationUpdatePayload extends IEventOptions { details: { currentIdx: number; currentPage: string; previousPage: string; }; } type IFlowEventBusParams<TType extends FlowEventType, TPayload extends TFlowEventBusPayload> = { type: TType; payload: TPayload; }; type FlowEvent = IFlowEventBusParams<'FLOW_COMPLETE', IFlowCompletePayload> | IFlowEventBusParams<'FLOW_EXIT', IFlowExitPayload> | IFlowEventBusParams<'FLOW_ERROR', IFlowErrorPayload> | IFlowEventBusParams<'FLOW_NAVIGATION_UPDATE', IFlowNavigationUpdatePayload>; export type FlowEventBusFn = <T extends FlowEvent>(flowEvent: T) => void; export {}; //# sourceMappingURL=interfaces.d.ts.map