import type { EventHub } from '../common'; import type { DeepPartial } from '../common/shared/models/general'; import type { DocumentType } from '../common/shared/models/SupportingDocument'; import type { ImplementModuleDefinition, ModuleDefinition } from '../common/types'; import type { FormEvents } from './events'; import type { LegacyUIConfiguration } from './vendors/legacy/legacyUIOptions.types'; import type { Content, TPageConfig } from './vendors/react/appConfig.type'; import type { ReactFormIdsKeys } from './vendors/react/types/pages.type'; import type { PartialDeep } from 'type-fest'; interface IFormModule extends ModuleDefinition { moduleName: 'form'; category: 'component'; moduleContext: { readonly provider: IFormModule['vendorName']; mount: (mountElement: string | HTMLElement) => Promise; unmount: () => void; }; moduleEvents: FormEvents; moduleOptions: PartialDeep; recipeConfiguration: { form: FormRecipeOptions; }; wrapperLoadType: 'async'; vendorName: 'legacy' | 'formio' | 'react'; wrapperOptions: { eventHub: EventHub; mountElement: HTMLElement; }; wrapperContext: WrapperContext; } export type FormModule = ImplementModuleDefinition; type WrapperContext = { cleanup: () => void; }; export type FormRecipeOptions = { provider: { name: 'legacy'; version: string; config?: DeepPartial; } | { name: 'formio'; formUrl: string; config: undefined; } | { name: 'react'; googleApiKey: string; useGoogleAutoCompleteSuggestion?: boolean; config?: ReactFormConfig; }; docUpload?: DocUploadRecipeOptions; verification?: VerificationRecipeOptions; }; export type DocUploadRecipeOptions = { requestedDocuments: { documentType: DocumentType; name?: string; }[]; partialDocuments: { title: string; documents: { documentType: DocumentType; name?: string; }[]; minimumRequirement: number; }[]; optionalDocuments: { documentType: DocumentType; name?: string; }[]; }; export type VerificationRecipeOptions = { options: (Content & { vendor: string; product: string; logo?: { src: string; alt?: string; }; })[]; }; export type ConfigMode = 'individual' | 'business'; export type ConfigCategory = 'ocr' | 'manual' | 'doc_upload'; export type ReactFormConfig = { mode: ConfigMode; name: ReactFormIdsKeys; type?: ConfigCategory; } & TPageConfig; export {}; //# sourceMappingURL=definition.d.ts.map