import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorRefFromLogic, b as RequiredActorOptions, c as AnyEventObject, g as IsNotNever, h as InputFrom, i as ActorRefFrom, k as MachineSnapshot, m as GetConcreteByKey, o as AnyActorLogic, p as EventObject, r as ActorRef, s as AnyActorRef, u as ConditionalRequired, v as MetaObject, x as RequiredLogicInput, y as NonReducibleUnknown } from "./spawn-D9jgw9pW.js"; import "./StateMachine-EDpYWy0i.js"; import { t as Manager } from "./Manager-CQQ99QOI.js"; import "./Actor-iTq7YY48.js"; //#region src/modules/id-verification/types.d.ts type IdVerificationConfig = { /** When true, verify the second captured ID via `/omni/process/second-id`. */ isSecondId?: boolean; /** * Queue name forwarded as a query parameter. Always sent (default empty * string) so the request shape matches the legacy `/omni/process/id?queueName=` * call that returns 200 today. */ queueName?: string; /** * Workflow engine writes the rank into the module configuration when one * `ID` node represents the second ID. When set to `'SECOND_ID'` the * verification routes to the second-id endpoint even without an explicit * `isSecondId` flag. */ idRank?: 'FIRST_ID' | 'SECOND_ID' | 'THIRD_ID'; }; type ProcessIdResponse = { isDocumentExpired: boolean; }; //#endregion //#region src/modules/id-verification/idVerificationStateMachine.d.ts type IdVerificationContext = { config: IdVerificationConfig; isSecondId: boolean; }; type IdVerificationInput = { config: IdVerificationConfig; }; declare const idVerificationMachine: StateMachine> | undefined; }, { src: "processId"; logic: PromiseActorLogic; id: string | undefined; }, never, { type: "isDocumentExpired"; params: unknown; }, never, "idle" | "processing" | "finished" | "expired", string, IdVerificationInput, NonReducibleUnknown, EventObject, MetaObject, { readonly id: "idVerification"; readonly initial: "idle"; readonly context: ({ input }: { spawn: { (logic: TSrc, ...[options]: { src: "processId"; logic: PromiseActorLogic; id: string | undefined; } extends (infer T) ? T extends { src: "processId"; logic: PromiseActorLogic; id: string | undefined; } ? T extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never): ActorRefFromLogic; id: string | undefined; }, "src", TSrc>["logic"]>; (src: TLogic, ...[options]: ConditionalRequired<[options?: ({ id?: never; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K in RequiredLogicInput]: unknown; }) | undefined], IsNotNever>>): ActorRefFromLogic; }; input: IdVerificationInput; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "CONTINUE"; }, AnyEventObject>; }) => { config: IdVerificationConfig; isSecondId: boolean; }; readonly states: { readonly idle: { readonly on: { readonly LOAD: "processing"; }; }; readonly processing: { readonly invoke: { readonly id: "processId"; readonly src: "processId"; readonly input: ({ context }: { context: IdVerificationContext; event: { type: "LOAD"; } | { type: "CONTINUE"; }; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "CONTINUE"; }, AnyEventObject>; }) => { isSecondId: boolean; queueName: string; }; readonly onDone: readonly [{ readonly target: "expired"; readonly guard: "isDocumentExpired"; }, { readonly target: "finished"; }]; readonly onError: { readonly target: "finished"; }; }; }; readonly expired: { readonly on: { readonly CONTINUE: "finished"; }; }; readonly finished: { readonly type: "final"; }; }; }>; type IdVerificationMachine = typeof idVerificationMachine; //#endregion //#region src/modules/id-verification/idVerificationActor.d.ts type CreateIdVerificationActorOptions = { config: IdVerificationConfig; }; type IdVerificationActor = ActorRefFrom; //#endregion //#region src/modules/id-verification/idVerificationManager.d.ts type IdVerificationIdleState = { status: 'idle'; }; type IdVerificationProcessingState = { status: 'processing'; }; type IdVerificationExpiredState = { status: 'expired'; }; type IdVerificationFinishedState = { status: 'finished'; }; type IdVerificationState = IdVerificationIdleState | IdVerificationProcessingState | IdVerificationExpiredState | IdVerificationFinishedState; declare function createIdVerificationManager(options: CreateIdVerificationActorOptions): Manager & { load(): void; continue(): void; }; /** * Creates an id-verification manager from a pre-built actor. * Use this when overriding the machine via `.provide()` for custom backends * or for story-isolation testing. */ declare function createIdVerificationManagerFromActor(actor: IdVerificationActor): Manager & { load(): void; continue(): void; }; type IdVerificationManager = ReturnType; //#endregion export { IdVerificationActor as a, createIdVerificationManagerFromActor as i, IdVerificationState as n, idVerificationMachine as o, createIdVerificationManager as r, IdVerificationConfig as s, IdVerificationManager as t };