import type { AccessFunction, AccessorsDictionary, EventHub } from '../common'; import type { DocumentType } from '../common/shared/models/SupportingDocument'; import type { ImplementModuleDefinition, ModuleDefinition } from '../common/types'; import type { IdverseTranslationKeys } from '../common/vendors/idverse'; import type { DeepStringRecord, IncodeLang } from '../common/vendors/incode'; import type { OnfidoCustomUIProps, OnfidoLanguage } from '../common/vendors/onfido/onfido.types'; import type { SumsubConfig, SumsubOptions } from '../common/vendors/sumsub/sumsub.types'; import type { InputRequiredStatus, OCRStatus } from '../frankie-client/clients/OCRClient'; import type { Events } from './events'; import type { PartialDeep } from 'type-fest'; interface IOCRModule extends ModuleDefinition { moduleName: 'ocr'; category: 'component'; moduleContext: { mount(domElementOrSelector: string | HTMLElement): void; start(): void; unmount(): void; access: AccessFunction; isPreloaded: () => boolean | null; statuses: Readonly; }; moduleEvents: Events; moduleOptions: PartialDeep; recipeConfiguration: { ocr: OCRRecipeOptions; }; vendorName: 'dummy-ocr' | 'incode' | 'onfido' | 'sumsub' | 'idverse' | 'daon'; wrapperOptions: { eventHub: EventHub; mountElement: HTMLElement; }; wrapperLoadType: 'async'; wrapperContext: OCRWrapperContext; } export type OCRModule = ImplementModuleDefinition; export type PublicAccessors = AccessorsDictionary<{ readonly status: InputRequiredStatus | OCRStatus.COMPLETE | null; readonly isPreloaded: boolean | null; }>; export type OnfidoShareOption = 'qr_code' | 'copy_link' | 'sms'; export type DaonProcessInstanceParameters = { name: string; mandatory: boolean; minimumLength?: number; maximumLength?: number; default: string | number; }; export type OCRRecipeOptions = { provideReviewScreen?: boolean; maxDocumentCount?: number; documents?: { type: DocumentType; countries?: string[]; digital?: boolean; }[]; provider: { name: 'idverse'; translations?: IdverseTranslationKeys; retryCount?: number; skipLoad?: boolean; workerPathString?: string; assetPathString?: string; } | { name: 'incode'; sdkVersion?: string; numberOfTries?: number; consentId?: string | null; /** * Opt in to Incode's `renderCaptureId` instead of `renderCamera('front'|'back')`, * using their v2 ID-capture experience (`forceIdV2`). Prerequisite for Incode's * DeepSight deepfake / injection detection. Only honoured on Incode SDK >= 1.80.0. * * `renderCamera.showDocSelector` also routes to `renderCaptureId`, but stays on * the v1 experience — see captureDocument in startCamera. */ renderCaptureId?: boolean; renderCamera?: { showDocSelector?: boolean; showTutorial?: boolean; }; translations?: DeepStringRecord; lang?: IncodeLang; renderCameraProps?: Record; products: string[]; } | { name: 'onfido'; sdkVersion?: string; onUserExit?: () => void; showExitButton?: boolean; theme?: 'light' | 'dark'; crossDevicePolicy?: 'force' | 'disable'; _crossDeviceLinkMethods?: Array; customUI?: OnfidoCustomUIProps; hideCountrySelection?: boolean; language?: OnfidoLanguage; translations?: Record; } | { name: 'sumsub'; config?: SumsubConfig; options?: SumsubOptions; } | { name: 'daon'; products: Array; processInstanceParameters?: Array; }; skipInitProcess?: boolean; }; export type OCRWrapperContext = { unmount?: () => void; }; export type OCRWrapperContextRef = { current: OCRWrapperContext | null; }; export {}; //# sourceMappingURL=definition.d.ts.map