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.

168 lines 5.48 kB
import { INavigationButtons } from '../../molecules/NavigationButtons'; import { IDocumentOptions } from '../../organisms/DocumentOptions'; import type { CaptureConfigOption } from 'jslib-html5-camera-photo'; import { IFlow } from '../flows'; import { EndUserInfo, FlowsBackendConfig, FlowsEventsConfig, FlowsGeneralTheme } from '../../../types/BallerineSDK'; import { ICSSProperties } from '../../services/css-manager'; import { ObjectValues, TDocumentKind, TDocumentType } from '../app-state/types'; import { MetricsConfig } from '../../../types/BallerineSDK'; export declare const Steps: { readonly Welcome: "welcome"; readonly DocumentSelection: "document-selection"; readonly DocumentStart: "document-start"; readonly DocumentPhoto: "document-photo"; readonly CheckDocument: "check-document"; readonly DocumentPhotoBackStart: "document-photo-back-start"; readonly DocumentPhotoBack: "document-photo-back"; readonly CheckDocumentPhotoBack: "check-document-photo-back"; readonly SelfieStart: "selfie-start"; readonly Selfie: "selfie"; readonly CheckSelfie: "check-selfie"; readonly A4DocumentStart: "a4-document-start"; readonly A4DocumentPhoto: "a4-document-photo"; readonly CheckA4Document: "check-a4-document"; readonly Registration: "registration"; readonly QRcode: "qrcode"; readonly Final: "final"; readonly Loading: "loading"; readonly Resubmission: "resubmission"; readonly Decline: "decline"; readonly Error: "error"; }; export type TSteps = ObjectValues<typeof Steps>; export declare const Elements: { readonly Image: "image"; readonly Photo: "photo"; readonly Title: "title"; readonly Paragraph: "paragraph"; readonly Button: "button"; readonly Input: "input"; readonly Container: "container"; readonly DocumentOption: "document-option"; readonly IconButton: "icon-button"; readonly IconCloseButton: "icon-close-button"; readonly CameraButton: "camera-button"; readonly VideoContainer: "video-container"; readonly List: "list"; readonly ErrorText: "error-text"; readonly Loader: "loader"; readonly QRcode: "qrcode"; }; export type TElements = ObjectValues<typeof Elements>; export type Icons = 'Card' | 'Passport' | 'License' | 'PassportTwo' | 'Voter'; interface IAttributesAll { icon: Icons; src: string; alt: string; width: string | number; height: string | number; value: string; name: string; type: string; placeholder: string; length: number; validate: () => boolean; defaultValue: string; } export type IAttributes = Partial<IAttributesAll>; export interface IFormProps { persistence: 'session' | 'local'; action: 'store' | 'api'; storeKey?: string; apiUrl?: string; } export interface IButton { theme: 'primary' | 'secondary'; } export interface IElementProps { style?: ICSSProperties; attributes?: IAttributes; context?: string; } export interface IElement { id: string; props: IElementProps; type: TElements; disabled?: boolean; orderIndex: number; elements?: IElement[]; } export interface IStepConfiguration { name: TSteps; style?: ICSSProperties; overlayStyle?: ICSSProperties; elements: IElement[]; form?: IFormProps; type?: TDocumentType; id: string; namespace?: string; cameraConfig?: CaptureConfigOption; documentOptions?: { type: TDocumentType; kind: TDocumentKind; }[]; qrCodeUrl?: string; } export interface IOverlayStyles { card?: ICSSProperties; passport?: ICSSProperties; a4?: ICSSProperties; selfie?: ICSSProperties; } export type TStepsConfigurations = IStepConfiguration[]; export interface IConfigurationComponents { container?: ICSSProperties; button?: ICSSProperties; buttonWithIcon?: ICSSProperties; iconButton?: ICSSProperties; iconCloseButton?: ICSSProperties; layout?: ICSSProperties; photo?: ICSSProperties; title?: ICSSProperties; paragraph?: ICSSProperties; navigationButtons?: INavigationButtons; documentOptions?: IDocumentOptions; image?: ICSSProperties; cameraButton?: ICSSProperties; videoContainer?: ICSSProperties; input?: ICSSProperties; loader?: ICSSProperties; errorText?: ICSSProperties; overlay?: ICSSProperties; } export interface IAppConfigurationUI { uiPack?: string; general?: FlowsGeneralTheme; components?: IConfigurationComponents; flows?: { [key: string]: { steps?: RecursivePartial<IStepConfiguration>[]; userType?: string; mobileNativeCamera?: boolean; syncFlow?: boolean; useFinalQueryParams?: boolean; firstScreenBackButton?: boolean; showCloseButton?: boolean; callbacks?: FlowsEventsConfig; }; }; settings?: ConfigSettings; } export interface IAppConfiguration extends Partial<IAppConfigurationUI> { isDevelopment: boolean; backendConfig: FlowsBackendConfig; endUserInfo: Omit<EndUserInfo, 'dateOfBirth' | 'endUserMetadata'> & { token?: string; }; flows: { [key: string]: IFlow; }; defaultLanguage: 'en' | 'es'; metricsConfig: MetricsConfig; } export interface ConfigSettings { cameraSettings: CaptureConfigOption; selfieCameraSettings: CaptureConfigOption; } export {}; //# sourceMappingURL=types.d.ts.map