@incodetech/core 0.0.0-dev-20260723-be346272 → 0.0.0-dev-20260723-397b76d8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/ae-signature.d.ts +2 -1
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/authentication.d.ts +3 -2
  4. package/dist/authentication.esm.js +2 -2
  5. package/dist/{authenticationManager-BCm7eGoK.d.ts → authenticationManager-Ce1nLm5y.d.ts} +1 -1
  6. package/dist/{authenticationManager-B9Qm5yqf.esm.js → authenticationManager-DW449fW3.esm.js} +2 -2
  7. package/dist/{authenticationStateMachine-C_zvYGnY.esm.js → authenticationStateMachine-CrvxMmoJ.esm.js} +2 -2
  8. package/dist/consent.d.ts +1 -1
  9. package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
  10. package/dist/{deepsightLoader-DLTccYCv.esm.js → deepsightLoader-BCxEZjuI.esm.js} +1 -1
  11. package/dist/document-capture.d.ts +2 -1
  12. package/dist/{documentCaptureManager-CBP2DkPr.d.ts → documentCaptureManager-pEqMY_Oo.d.ts} +2 -104
  13. package/dist/dynamic-forms.d.ts +2 -1
  14. package/dist/dynamic-forms.esm.js +2 -2
  15. package/dist/{dynamicFormsManager-Dposae2l.d.ts → dynamicFormsManager-BYac2uEY.d.ts} +2 -48
  16. package/dist/{dynamicFormsManager-Fi2O2RUM.esm.js → dynamicFormsManager-DI0sCyVB.esm.js} +1 -1
  17. package/dist/ekyb.d.ts +2 -1
  18. package/dist/ekyb.esm.js +3 -2
  19. package/dist/{ekybManager-BJk_XfA7.esm.js → ekybManager-D46NN7cx.esm.js} +1 -1
  20. package/dist/{ekybManager-CBX0tM04.d.ts → ekybManager-Dzswb_b8.d.ts} +3 -48
  21. package/dist/{ekybStateMachine-CUADos0H.esm.js → ekybStateMachine-DX7KeqlM.esm.js} +2 -170
  22. package/dist/ekyc.esm.js +3 -2
  23. package/dist/{ekycManager-CI7sN4Ln.esm.js → ekycManager-DRrG5I6e.esm.js} +1 -1
  24. package/dist/{ekycStateMachine-DFQdmBXl.esm.js → ekycStateMachine-DRbbavZy.esm.js} +2 -223
  25. package/dist/ekycUtils-Dew1rBG0.esm.js +223 -0
  26. package/dist/electronic-signature.d.ts +2 -1
  27. package/dist/electronic-signature.esm.js +1 -1
  28. package/dist/extensibility.d.ts +12 -11
  29. package/dist/extensibility.esm.js +9 -9
  30. package/dist/{faceCaptureManagerFactory-DPf1rRsd.d.ts → faceCaptureManagerFactory-BUE6z9iY.d.ts} +2 -4
  31. package/dist/{faceCaptureManagerFactory-C7hNylWL.esm.js → faceCaptureManagerFactory-BcntOvvC.esm.js} +1 -1
  32. package/dist/{faceCaptureSetup-Bso0SOrU.esm.js → faceCaptureSetup-BUAw6zY_.esm.js} +2 -2
  33. package/dist/flow.d.ts +44 -1
  34. package/dist/flow.esm.js +4 -11
  35. package/dist/flowServices-BU1mMxoQ.esm.js +596 -0
  36. package/dist/geolocation.esm.js +2 -2
  37. package/dist/{geolocationManager-bZDyI0gy.esm.js → geolocationManager-zeqAcVHC.esm.js} +1 -1
  38. package/dist/id-ocr.d.ts +2 -1
  39. package/dist/id.d.ts +2 -1
  40. package/dist/id.esm.js +2 -2
  41. package/dist/{idCaptureManager-BDCJwgrN.esm.js → idCaptureManager-BqmmPXFm.esm.js} +1 -1
  42. package/dist/idCaptureManager-CtsYvX-Z.d.ts +405 -0
  43. package/dist/{idCaptureStateMachine-DZjn9cjg.esm.js → idCaptureStateMachine-CnKkMNrI.esm.js} +5 -5
  44. package/dist/{idOcrManager-B-JyjyPb.d.ts → idOcrManager-DlYG277_.d.ts} +2 -163
  45. package/dist/{index-CKbmDFNq.d.ts → index-DGcdhk8Y.d.ts} +2 -64
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.esm.js +1 -1
  48. package/dist/mandatory-consent.d.ts +2 -1
  49. package/dist/{mandatoryConsentManager-Bc9AKBft.d.ts → mandatoryConsentManager-Ck2e2W4o.d.ts} +6 -25
  50. package/dist/{onDeviceFaceResults-D7Ymps8b.esm.js → onDeviceFaceResults-CWMT6JTR.esm.js} +1 -1
  51. package/dist/personhood.esm.js +2 -2
  52. package/dist/qe-signature.d.ts +2 -1
  53. package/dist/qe-signature.esm.js +1 -1
  54. package/dist/{recordingService-OzNK87cy.esm.js → recordingService-CfT3nmFO.esm.js} +1 -1
  55. package/dist/redirect-to-mobile.d.ts +2 -1
  56. package/dist/{redirectToMobileManager-NVQM3o5P.d.ts → redirectToMobileManager-DZlJhqvq.d.ts} +2 -40
  57. package/dist/selfie.d.ts +2 -2
  58. package/dist/selfie.esm.js +4 -4
  59. package/dist/{selfieManager-CTfo3Af7.esm.js → selfieManager-D-QJUh3X.esm.js} +2 -2
  60. package/dist/{selfieManager-Dq9wNlcg.d.ts → selfieManager-LabfZln4.d.ts} +1 -1
  61. package/dist/{selfieStateMachine-CBHAhVhb.esm.js → selfieStateMachine-BH-U-y6R.esm.js} +2 -2
  62. package/dist/session-BU4MkUEc.esm.js +1 -0
  63. package/dist/session.d.ts +2 -0
  64. package/dist/session.esm.js +2 -2
  65. package/dist/{sessionInitializer-Cn9Ol4oc.esm.js → sessionInitializer-DT7IYwRx.esm.js} +58 -11
  66. package/dist/{setup-BBfVpTog.d.ts → setup-B1WTXTQV.d.ts} +15 -0
  67. package/dist/{setup-BUSg9dNN.esm.js → setup-DXdKnXXf.esm.js} +21 -7
  68. package/dist/types-B4BObr_7.d.ts +105 -0
  69. package/dist/types-BAvkiv6L.d.ts +6 -0
  70. package/dist/types-BQgIv5p8.d.ts +21 -0
  71. package/dist/types-BfHiko5D.d.ts +48 -0
  72. package/dist/types-CBJI9n6h.d.ts +163 -0
  73. package/dist/{idCaptureManager-DOYaK3vb.d.ts → types-D0ohdBDu.d.ts} +2 -401
  74. package/dist/types-DPIDuhut2.d.ts +40 -0
  75. package/dist/types-DWaEoU0I.d.ts +64 -0
  76. package/dist/types-xIEGXWk8.d.ts +48 -0
  77. package/dist/video-selfie.esm.js +3 -3
  78. package/dist/wasm.d.ts +1 -1
  79. package/dist/wasm.esm.js +1 -1
  80. package/dist/workflow.esm.js +16 -11
  81. package/package.json +1 -1
  82. package/dist/flowServices-BEPX-eK1.esm.js +0 -209
  83. package/dist/session-D9poVEP5.esm.js +0 -1
  84. package/dist/videoSelfieSteps-DHcibfYH.esm.js +0 -57
  85. package/dist/{dynamicFormsStateMachine-DiPpuHgF.esm.js → dynamicFormsStateMachine-BQqAwNQ-.esm.js} +1 -1
  86. package/dist/{electronicSignatureManager-DGFwHdro.esm.js → electronicSignatureManager-BXIpAJ5m.esm.js} +1 -1
  87. package/dist/{geolocationStateMachine-ByU6-nbM.esm.js → geolocationStateMachine-DxSETS9_.esm.js} +1 -1
@@ -0,0 +1,405 @@
1
+ import { A as StateMachine, i as ActorRefFrom, l as AnyStateMachine } from "./spawn-D9jgw9pW.js";
2
+ import "./StateMachine-EDpYWy0i.js";
3
+ import { t as Manager } from "./Manager-CQQ99QOI.js";
4
+ import "./Actor-iTq7YY48.js";
5
+ import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
6
+ import "./index-B8weJxmL.js";
7
+ import { t as CameraStream } from "./camera-9wWD-pwg.js";
8
+ import { t as DeepsightService } from "./deepsightService-CR-CYdka.js";
9
+ import { a as RegulationTypes } from "./types-BjTTkLmd.js";
10
+ import { n as PermissionStatus } from "./types-BT-aiBYV.js";
11
+ import { A as ManualUploadSide, C as RecordingSession, F as Pdf417DecodeResult, M as DetectionOrientation, N as IIdCaptureCapability, T as IAnalyticsCapability, a as DetectionArea, c as IdCaptureConfig, d as IdCaptureEvent, g as IdCaptureOutput, h as IdCaptureOnlyConfig, j as ManualUploadTab, l as IdCaptureContext, m as IdCaptureMode, n as CaptureIdResponse, o as DetectionStatus, p as IdCaptureInput, t as AddBarcodeV3Response, u as IdCaptureDependencies, w as UploadIdResponse, x as IdErrorCode, y as IdDocumentType } from "./types-D0ohdBDu.js";
12
+ //#region src/modules/id/idCaptureStateMachine.d.ts
13
+ declare const idCaptureMachine: AnyStateMachine;
14
+ type IdCaptureMachine = StateMachine<IdCaptureContext, IdCaptureEvent, any, any, any, any, any, any, any, IdCaptureInput, any, any, any, any>;
15
+ //#endregion
16
+ //#region src/modules/id/idCaptureActor.d.ts
17
+ type CreateIdCaptureActorOptions = {
18
+ config: IdCaptureConfig;
19
+ dependencies?: IdCaptureDependencies;
20
+ };
21
+ type IdCaptureActor = ActorRefFrom<IdCaptureMachine>;
22
+ declare function createIdCaptureActor(options: CreateIdCaptureActorOptions): IdCaptureActor;
23
+ //#endregion
24
+ //#region src/modules/id/idCaptureOnlyStateMachine.d.ts
25
+ type IdCaptureOnlyContext = IdCaptureContext;
26
+ type IdCaptureOnlyEvent = IdCaptureEvent;
27
+ type IdCaptureOnlyInput = IdCaptureInput;
28
+ /**
29
+ * ID capture state machine variant for the captureOnly flow. Shares the full
30
+ * base ID-capture state tree (chooser, tutorial, permissions, capture,
31
+ * front/back finished, processing, finished); only the upload, process, and
32
+ * recording steps are local instead of remote.
33
+ */
34
+ declare const idCaptureOnlyMachine: AnyStateMachine;
35
+ type IdCaptureOnlyMachine = StateMachine<IdCaptureOnlyContext, IdCaptureOnlyEvent, any, any, any, any, any, any, any, IdCaptureOnlyInput, any, any, any, any>;
36
+ //#endregion
37
+ //#region src/modules/id/idCaptureOnlyActor.d.ts
38
+ type CreateIdCaptureOnlyActorOptions = {
39
+ config: IdCaptureOnlyConfig;
40
+ dependencies?: IdCaptureDependencies;
41
+ };
42
+ type IdCaptureOnlyActor = ActorRefFrom<IdCaptureOnlyMachine>;
43
+ declare function createIdCaptureOnlyActor(options: CreateIdCaptureOnlyActorOptions): IdCaptureOnlyActor;
44
+ //#endregion
45
+ //#region src/modules/id/idCaptureServices.d.ts
46
+ type IdCaptureInitResult = {
47
+ stream: CameraStream;
48
+ provider: IIdCaptureCapability;
49
+ captureResolution?: string;
50
+ cameraFallbackLevel?: number;
51
+ };
52
+ type InitializeIdCaptureParams = {
53
+ config: IdCaptureConfig;
54
+ deepsightService?: DeepsightService;
55
+ };
56
+ declare function initializeIdCapture(params: InitializeIdCaptureParams): Promise<IdCaptureInitResult>;
57
+ declare function stopStream(stream: CameraStream): void;
58
+ type UploadIdImageParams = {
59
+ image: string;
60
+ type: 'front' | 'back';
61
+ sendBase64?: boolean;
62
+ isSecondId?: boolean;
63
+ onlyFront?: boolean;
64
+ glare?: number;
65
+ sharpness?: number;
66
+ shouldSkipGlareBack?: boolean;
67
+ shouldSkipGlareFront?: boolean;
68
+ captureType?: string;
69
+ ageAssurance?: boolean;
70
+ onProgress?: (progress: number) => void;
71
+ metadata?: string;
72
+ signal?: AbortSignal;
73
+ analyticsProvider?: IAnalyticsCapability;
74
+ imageData?: ImageData;
75
+ /**
76
+ * [ENG-44176] When `false`, attaches `extractIdFace=false` as a query param
77
+ * to `POST /omni/add/front-id/v2` so the backend skips biometric face
78
+ * extraction. Forwarded only for `type === 'front'`. Omitted / `true` is a
79
+ * no-op on the wire (backend default is extraction on).
80
+ */
81
+ extractIdFace?: boolean;
82
+ };
83
+ type ValidationError = {
84
+ error: boolean;
85
+ message: string;
86
+ messageDescription?: string;
87
+ errorKey: IdErrorCode;
88
+ };
89
+ declare function validateUploadResponse(response: UploadIdResponse & {
90
+ failReason?: string;
91
+ side?: 'front' | 'back';
92
+ }, sessionState?: {
93
+ skipGlareFront?: boolean;
94
+ skipGlareBack?: boolean;
95
+ }): ValidationError | undefined;
96
+ declare function uploadIdImage(params: UploadIdImageParams): Promise<CaptureIdResponse>;
97
+ type StartRecordingParams = {
98
+ config: IdCaptureConfig;
99
+ stream: CameraStream;
100
+ existing?: RecordingSession;
101
+ type: 'frontId' | 'backId';
102
+ };
103
+ declare function preloadIdRecordingProvider(config: IdCaptureConfig): void;
104
+ declare function startRecordingSession(params: StartRecordingParams): Promise<RecordingSession | undefined>;
105
+ declare function stopRecording(session: RecordingSession): void;
106
+ declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
107
+ isDocumentExpired: boolean;
108
+ }>;
109
+ type UploadManualIdFileParams = {
110
+ side: 'front' | 'back' | 'passport';
111
+ /**
112
+ * Raw base64 payload (no `data:<mime>;base64,` prefix). Callers must strip
113
+ * the data-URL prefix — the v2 backend rejects data URLs with
114
+ * `IllegalArgumentException: Illegal base64 character 3a`.
115
+ */
116
+ base64Image: string;
117
+ retry?: boolean;
118
+ onlyFront?: boolean;
119
+ signal?: AbortSignal;
120
+ isSecondId?: boolean;
121
+ /**
122
+ * [ENG-44176] When `false`, attaches `extractIdFace=false` to the upload
123
+ * so the backend skips biometric face extraction. Forwarded only for the
124
+ * `front` and `passport` sides; back uploads ignore it. Omitted / `true`
125
+ * is a no-op on the wire.
126
+ */
127
+ extractIdFace?: boolean;
128
+ };
129
+ /**
130
+ * Upload a user-selected image as front / back / passport ID.
131
+ *
132
+ * Uses the same request shape as the live-camera path (`uploadIdImage`):
133
+ * JSON body `{ base64Image }` with default application/json Content-Type,
134
+ * `captureType=UPLOAD` query param, `retry=true` when retrying.
135
+ * Back is POSTed to `/omni/add/back-id/v2` (or `/omni/add/back-second-id/v2`
136
+ * when `isSecondId`); front and passport go to `/omni/add/front-id/v2` (or
137
+ * `/omni/add/front-second-id/v2` when `isSecondId`).
138
+ *
139
+ * The v2 endpoints reject raw `image/jpeg` bodies with 415, so the caller
140
+ * must convert the File to base64 before calling this service.
141
+ */
142
+ declare function uploadManualIdFile(params: UploadManualIdFileParams): Promise<UploadIdResponse>;
143
+ /**
144
+ * UTF-8-safe base64 encoding of a decoded barcode payload. Uses the browser
145
+ * `TextEncoder` + `btoa` (always available in the SDK's target environment) so
146
+ * non-ASCII payloads survive `btoa`, which only accepts Latin-1.
147
+ */
148
+ declare function barcodeToBase64(raw: string): string;
149
+ type AddBarcodeParams = {
150
+ rawBarcode: string;
151
+ /** When true (default), the server processes the ID from the barcode. */
152
+ processId?: boolean;
153
+ /** PDF417 decode-quality metrics forwarded to the server (best-effort). */
154
+ metrics?: Pdf417DecodeResult | null;
155
+ signal?: AbortSignal;
156
+ };
157
+ /**
158
+ * US Smart Capture: submits a decoded PDF417 barcode to
159
+ * `POST /omni/add/barcode/v3`. The response drives the downstream front-capture
160
+ * and Process ID skips (`forceFrontIdCapture` / `idValidationCompleted`).
161
+ * Mirrors SDK 1's `addBarcode`. Throws (carrying `status`/`data`) on a non-OK
162
+ * response so the caller can fall back to a full-frame upload. The
163
+ * hardware-id token is injected by the shared `api` layer, as in `uploadIdImage`.
164
+ */
165
+ declare function addBarcode(params: AddBarcodeParams): Promise<AddBarcodeV3Response>;
166
+ //#endregion
167
+ //#region src/modules/id/digitalUpload/types.d.ts
168
+ type DigitalUploadFailReason = 'DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED' | 'ID_TYPE_UNACCEPTABLE' | 'FILE_CHANGED_ERROR' | 'INVALID_FILE_TYPE' | 'NETWORK_ERROR' | 'GENERIC';
169
+ //#endregion
170
+ //#region src/internal/idCapture/idCaptureManagerFactory.d.ts
171
+ type CaptureStatus = 'initializing' | 'detecting' | 'capturing' | 'uploading' | 'uploadError' | 'success';
172
+ type IdCaptureIdleState = {
173
+ status: 'idle';
174
+ };
175
+ type IdCaptureChooserState = {
176
+ status: 'chooser';
177
+ availableDocumentTypes: IdDocumentType[];
178
+ };
179
+ type IdCaptureLoadingState = {
180
+ status: 'loading';
181
+ };
182
+ type IdCaptureTutorialState = {
183
+ status: 'tutorial';
184
+ selectedDocumentType: IdDocumentType | undefined;
185
+ currentMode: IdCaptureMode;
186
+ };
187
+ type IdCaptureAgeVerificationState = {
188
+ status: 'ageVerification';
189
+ };
190
+ type IdCapturePermissionsState = {
191
+ status: 'permissions';
192
+ permissionStatus: PermissionStatus;
193
+ };
194
+ type IdCaptureCaptureState = {
195
+ status: 'capture';
196
+ captureStatus: CaptureStatus;
197
+ stream: CameraStream | undefined;
198
+ detectionStatus: DetectionStatus;
199
+ debugFrame: ImageData | undefined;
200
+ attemptsRemaining: number;
201
+ uploadError: IdErrorCode | undefined;
202
+ currentMode: IdCaptureMode;
203
+ counterValue: number;
204
+ orientation: DetectionOrientation | undefined;
205
+ idType: string | undefined;
206
+ previewImageUrl?: string;
207
+ uploadProgress?: number;
208
+ ageAssurance: boolean;
209
+ uploadErrorMessage?: string;
210
+ uploadErrorDescription?: string;
211
+ /** Whether back capture is needed after front capture completes */
212
+ needsBackCapture: boolean;
213
+ /** Whether front capture is needed after back capture (usSmartCapture + forceFrontIdCapture) */
214
+ needsFrontCapture: boolean;
215
+ showCaptureButtonInAuto: boolean;
216
+ /** Whether retry is available (attemptsRemaining > 0) */
217
+ canRetry: boolean;
218
+ };
219
+ type IdCaptureMandatoryConsentState = {
220
+ status: 'mandatoryConsent';
221
+ regulationType: RegulationTypes;
222
+ };
223
+ type IdCaptureFrontFinishedState = {
224
+ status: 'frontFinished';
225
+ };
226
+ type IdCaptureBackFinishedState = {
227
+ status: 'backFinished';
228
+ };
229
+ type IdCaptureProcessingState = {
230
+ status: 'processing';
231
+ };
232
+ type IdCaptureExpiredState = {
233
+ status: 'expired';
234
+ /**
235
+ * Remaining attempts after this expired result. Mirrors V1's
236
+ * `idv2.capture.processing.attemptsRemainingLabel` counter and Figma's
237
+ * "X attempts remaining" line on `1-9-11-id-documenterror`.
238
+ */
239
+ attemptsRemaining: number;
240
+ /** Which side just expired — drives the back-specific subtitle in the UI. */
241
+ currentMode: IdCaptureMode;
242
+ };
243
+ type IdCaptureExpiredExhaustedState = {
244
+ status: 'expiredExhausted';
245
+ };
246
+ type IdCaptureFinishedState = {
247
+ status: 'finished';
248
+ /**
249
+ * Terminal output of the ID machine — the downstream module-skip signal
250
+ * (e.g. `skipFaceMatch` for the US Smart Capture "no front, no match" path).
251
+ * UI-driven modules don't auto-propagate machine output to the orchestrator,
252
+ * so the UI forwards this to `flowManager.completeModule(output)` on finish.
253
+ */
254
+ output?: IdCaptureOutput;
255
+ };
256
+ type IdCaptureClosedState = {
257
+ status: 'closed';
258
+ };
259
+ type IdCaptureErrorState = {
260
+ status: 'error';
261
+ error: string;
262
+ };
263
+ type ManualUploadUploadingSide = ManualUploadSide;
264
+ type IdCaptureManualUploadState = {
265
+ status: 'manualUpload';
266
+ phase: 'selecting' | 'uploading' | 'exhausted';
267
+ /** Which side is currently uploading (undefined in `selecting`/`exhausted`). */
268
+ uploadingSide: ManualUploadUploadingSide | undefined;
269
+ activeTab: ManualUploadTab;
270
+ showIdTab: boolean;
271
+ showPassportTab: boolean;
272
+ /** Whether the ID tab should render a back-of-ID slot. */
273
+ showBackSlot: boolean;
274
+ frontFileName: string | undefined;
275
+ backFileName: string | undefined;
276
+ passportFileName: string | undefined;
277
+ frontUploaded: boolean;
278
+ backUploaded: boolean;
279
+ passportUploaded: boolean;
280
+ canContinue: boolean;
281
+ retriesLeft: number;
282
+ /** i18n key for the current error message, if any. */
283
+ errorKey: string | null;
284
+ errorSide: ManualUploadSide | null;
285
+ };
286
+ type IdCaptureDigitalUploadState = {
287
+ status: 'digitalIdUpload';
288
+ phase: 'tutorial' | 'selecting' | 'reviewing' | 'uploading' | 'holding' | 'success' | 'error' | 'fileTooLarge' | 'exhausted';
289
+ file: File | null;
290
+ fileName: string | undefined;
291
+ failReason: DigitalUploadFailReason | null;
292
+ attemptsRemaining: number;
293
+ uploadProgress: number;
294
+ pickerRequestId: number;
295
+ };
296
+ type IdCaptureState = IdCaptureIdleState | IdCaptureChooserState | IdCaptureLoadingState | IdCaptureTutorialState | IdCaptureAgeVerificationState | IdCapturePermissionsState | IdCaptureCaptureState | IdCaptureMandatoryConsentState | IdCaptureFrontFinishedState | IdCaptureBackFinishedState | IdCaptureProcessingState | IdCaptureExpiredState | IdCaptureExpiredExhaustedState | IdCaptureFinishedState | IdCaptureClosedState | IdCaptureErrorState | IdCaptureManualUploadState | IdCaptureDigitalUploadState;
297
+ /**
298
+ * Union of all `idCaptureMachine` variants' actor types. Variants share the
299
+ * same state tree and context shape, so the manager helpers
300
+ * (`mapState`, `createApi`) work uniformly for either flavor at runtime.
301
+ */
302
+ type AnyIdCaptureActor = IdCaptureActor | IdCaptureOnlyActor;
303
+ /**
304
+ * Builds the public ID capture manager from an already-created actor.
305
+ * Used by both `createIdCaptureManager` and `createIdCaptureOnlyManager`.
306
+ *
307
+ * The internal cast to `IdCaptureActor` narrows the union for `createManager`,
308
+ * which is typed against the regular machine. Variants produced via
309
+ * `idCaptureMachine.provide({...})` share the same context and event types,
310
+ * so the cast is sound at runtime — only the actor implementation differs.
311
+ *
312
+ * `visibilityObserver` defaults to the browser `document.visibilitychange`
313
+ * provider so first-party and BYO-actor callers get foreground/background
314
+ * events without extra wiring. Construction lives here — a documented,
315
+ * narrow deviation from "never `new` a provider inside Core" (see
316
+ * `docs/patterns/CAPABILITY.md`). Pass a fake/no-op to override (tests do).
317
+ */
318
+ declare function createIdCaptureManagerFromActor(actor: AnyIdCaptureActor, visibilityObserver?: IVisibilityObserverCapability): Manager<IdCaptureState> & {
319
+ load(): void;
320
+ selectDocument(documentType: IdDocumentType): void;
321
+ nextStep(): Promise<void>;
322
+ requestPermission(): void;
323
+ goToLearnMore(): void;
324
+ back(): void;
325
+ close(): void;
326
+ reset(): void;
327
+ retryCapture(): void;
328
+ continueExhausted(): void;
329
+ continueFromError(): void;
330
+ capture(): void;
331
+ switchToManualCapture(): void;
332
+ continueToBack(): void;
333
+ continueToFront(): void;
334
+ skipBack(): void;
335
+ acceptMandatoryConsent(): void;
336
+ cancelMandatoryConsent(): void;
337
+ /**
338
+ * Updates the detection area used for WASM geometry calculation.
339
+ * Call this when the UI detection area dimensions change (e.g., on resize or orientation change).
340
+ */
341
+ updateDetectionArea(detectionArea: DetectionArea): void;
342
+ /**
343
+ * Manual upload: tab change (ID / Passport). Resets per-tab file selections.
344
+ * Note: there is intentionally no `switchToManualUpload` method — entry to
345
+ * the manual-upload flow is gated by config + Chooser to prevent a
346
+ * dev-console bypass of live camera capture.
347
+ */
348
+ manualUploadChangeTab(tab: ManualUploadTab): void;
349
+ manualUploadSelectFile(side: ManualUploadSide, file: File): void;
350
+ manualUploadContinue(): void;
351
+ manualUploadReset(): void;
352
+ digitalUploadNextStep(): void;
353
+ digitalUploadPickFile(file: File): void;
354
+ digitalUploadConfirm(): void;
355
+ digitalUploadReplace(): void;
356
+ digitalUploadRetry(): void;
357
+ digitalUploadScanInstead(): void;
358
+ digitalUploadChooseAnother(): void;
359
+ };
360
+ type IdCaptureManager = ReturnType<typeof createIdCaptureManagerFromActor>;
361
+ //#endregion
362
+ //#region src/modules/id/idCaptureManager.d.ts
363
+ /**
364
+ * Creates a manager for the regular ID capture flow. The shared
365
+ * `mapState`/`createApi`/state-types live in
366
+ * `internal/idCapture/idCaptureManagerFactory.ts`; this file is a thin
367
+ * wrapper that creates the actor and delegates to the factory.
368
+ *
369
+ * For the captureOnly flow (rich payload delivered locally via `onCapture`),
370
+ * use `createIdCaptureOnlyManager`.
371
+ */
372
+ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): Manager<IdCaptureState> & {
373
+ load(): void;
374
+ selectDocument(documentType: IdDocumentType): void;
375
+ nextStep(): Promise<void>;
376
+ requestPermission(): void;
377
+ goToLearnMore(): void;
378
+ back(): void;
379
+ close(): void;
380
+ reset(): void;
381
+ retryCapture(): void;
382
+ continueExhausted(): void;
383
+ continueFromError(): void;
384
+ capture(): void;
385
+ switchToManualCapture(): void;
386
+ continueToBack(): void;
387
+ continueToFront(): void;
388
+ skipBack(): void;
389
+ acceptMandatoryConsent(): void;
390
+ cancelMandatoryConsent(): void;
391
+ updateDetectionArea(detectionArea: DetectionArea): void;
392
+ manualUploadChangeTab(tab: ManualUploadTab): void;
393
+ manualUploadSelectFile(side: ManualUploadSide, file: File): void;
394
+ manualUploadContinue(): void;
395
+ manualUploadReset(): void;
396
+ digitalUploadNextStep(): void;
397
+ digitalUploadPickFile(file: File): void;
398
+ digitalUploadConfirm(): void;
399
+ digitalUploadReplace(): void;
400
+ digitalUploadRetry(): void;
401
+ digitalUploadScanInstead(): void;
402
+ digitalUploadChooseAnother(): void;
403
+ };
404
+ //#endregion
405
+ export { createIdCaptureActor as A, CreateIdCaptureOnlyActorOptions as C, idCaptureOnlyMachine as D, IdCaptureOnlyMachine as E, idCaptureMachine as M, CreateIdCaptureActorOptions as O, validateUploadResponse as S, createIdCaptureOnlyActor as T, startRecordingSession as _, AddBarcodeParams as a, uploadIdImage as b, StartRecordingParams as c, ValidationError as d, addBarcode as f, processId as g, preloadIdRecordingProvider as h, createIdCaptureManagerFromActor as i, IdCaptureMachine as j, IdCaptureActor as k, UploadIdImageParams as l, initializeIdCapture as m, IdCaptureManager as n, IdCaptureInitResult as o, barcodeToBase64 as p, IdCaptureState as r, InitializeIdCaptureParams as s, createIdCaptureManager as t, UploadManualIdFileParams as u, stopRecording as v, IdCaptureOnlyActor as w, uploadManualIdFile as x, stopStream as y };
@@ -3,20 +3,20 @@ import { r as getToken, t as api } from "./api-BDTZNnca.esm.js";
3
3
  import { x as revokeObjectURL } from "./events-Dy8PyVO5.esm.js";
4
4
  import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
5
5
  import { t as addDeviceStats } from "./stats-4DAk7TYl.esm.js";
6
- import { t as getDisableIpify } from "./sessionInitializer-Cn9Ol4oc.esm.js";
6
+ import { t as getDisableIpify } from "./sessionInitializer-DT7IYwRx.esm.js";
7
7
  import { n as isDesktop } from "./platform-Cd_yWGNG.esm.js";
8
+ import "./session-BU4MkUEc.esm.js";
8
9
  import { a as and, n as sendTo, r as assign, s as not, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
9
10
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
10
11
  import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-CkHL1BjH.esm.js";
11
- import { _ as StreamCanvasProcessingSession, h as stopRecording$1, m as startRecording, p as createRecordingSession } from "./onDeviceFaceResults-D7Ymps8b.esm.js";
12
+ import { _ as StreamCanvasProcessingSession, h as stopRecording$1, m as startRecording, p as createRecordingSession } from "./onDeviceFaceResults-CWMT6JTR.esm.js";
12
13
  import { t as IncodeCanvas } from "./canvas-E1zGkel4.esm.js";
13
14
  import { n as getBackCameraStream } from "./backCameraStream-6XQp9RxG.esm.js";
14
15
  import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
15
16
  import { t as getDeviceClass } from "./getDeviceClass-BGmoQmjj.esm.js";
16
17
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
17
18
  import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-5Cu6a8iN.esm.js";
18
- import { i as flagIdManualReview, n as preloadOpenViduProvider } from "./recordingService-OzNK87cy.esm.js";
19
- import "./session-D9poVEP5.esm.js";
19
+ import { i as flagIdManualReview, n as preloadOpenViduProvider } from "./recordingService-CfT3nmFO.esm.js";
20
20
  import { n as DEFAULT_ID_CAPTURE_THRESHOLDS$1, r as IdCaptureProvider } from "./idCaptureDefaults-DCrjeNl5.esm.js";
21
21
  //#region src/modules/id/digitalUpload/digitalUploadErrors.ts
22
22
  const TERMINAL_FAIL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
@@ -1615,7 +1615,7 @@ const startRecordingActor = fromPromise(async ({ input }) => {
1615
1615
  });
1616
1616
  const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
1617
1617
  if (!input.dependencies) return;
1618
- const { loadDeepsightSession } = await import("./deepsightLoader-DLTccYCv.esm.js");
1618
+ const { loadDeepsightSession } = await import("./deepsightLoader-BCxEZjuI.esm.js");
1619
1619
  return loadDeepsightSession({
1620
1620
  ds: input.ds,
1621
1621
  storage: input.dependencies.storage,
@@ -2,168 +2,7 @@ import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorR
2
2
  import "./StateMachine-EDpYWy0i.js";
3
3
  import { t as Manager } from "./Manager-CQQ99QOI.js";
4
4
  import "./Actor-iTq7YY48.js";
5
- //#region src/modules/id-ocr/types.d.ts
6
- type IdOcrConfig = {
7
- /** Allows user to edit OCR information @default false */
8
- editableOcr?: boolean;
9
- /**
10
- * When true (from flow/onboarding), after the first ID OCR step completes the
11
- * machine loads and optionally edits OCR for the second captured ID.
12
- */
13
- secondId?: boolean;
14
- /**
15
- * Session flow id (injected by orchestrated flow UI). When listed in `CPFFlowIds`
16
- * (`idOcrConsts`), only the CPF field is shown and validated; it maps to `documentNumber` on OCR.
17
- */
18
- flowId?: string;
19
- };
20
- type NameBean = {
21
- fullName?: string;
22
- firstName?: string;
23
- middleName?: string;
24
- givenName?: string;
25
- nameSuffix?: string;
26
- paternalLastName?: string;
27
- maternalLastName?: string;
28
- lastNameMrz?: string;
29
- };
30
- type AddressBean = {
31
- street?: string;
32
- colony?: string;
33
- postalCode?: string;
34
- city?: string;
35
- state?: string;
36
- label?: string;
37
- confidentGeolocation?: boolean;
38
- };
39
- type AddressStatements = {
40
- _id: string;
41
- dateType: string;
42
- addressStatementTimestamp: number;
43
- };
44
- type OcrData = {
45
- name: NameBean;
46
- givenName?: string;
47
- firstName?: string;
48
- middleName?: string;
49
- nameSuffix?: string;
50
- mothersSurname?: string;
51
- fathersSurname?: string;
52
- nickName?: string;
53
- address?: string;
54
- street?: string;
55
- colony?: string;
56
- postalCode?: string;
57
- city?: string;
58
- state?: string;
59
- stateCode?: string;
60
- countryCode?: string;
61
- addressFields?: AddressBean;
62
- fullAddress?: boolean;
63
- invalidAddress?: boolean;
64
- checkedAddress?: string;
65
- checkedAddressBean?: AddressBean;
66
- exteriorNumber?: string;
67
- interiorNumber?: string;
68
- addressFromStatement?: string;
69
- addressFieldsFromStatement?: AddressBean;
70
- invalidAddressFromStatement?: boolean;
71
- addressStatementEmissionDate?: number;
72
- documentType?: string;
73
- addressStatementTimestamps?: AddressStatements[];
74
- poaName?: string;
75
- typeOfId?: string;
76
- documentFrontSubtype?: string;
77
- documentBackSubtype?: string;
78
- birthDate?: number | string;
79
- gender?: string;
80
- claveDeElector?: string;
81
- curp?: string;
82
- numeroEmisionCredencial?: string;
83
- cic?: string;
84
- ocr?: string;
85
- documentNumber?: string;
86
- personalNumber?: string;
87
- refNumber?: string;
88
- nue?: string;
89
- externalId?: string;
90
- issuedAt?: string;
91
- expireAt?: string;
92
- expirationDate?: number;
93
- issueDate?: number;
94
- registrationDate?: number;
95
- issuingCountry?: string;
96
- issuingState?: string;
97
- birthPlace?: string;
98
- issuingAuthority?: string;
99
- height?: string;
100
- weight?: string;
101
- eyeColor?: string;
102
- hairColor?: string;
103
- bloodType?: string;
104
- maritalStatus?: string;
105
- nationality?: string;
106
- nationalityMrz?: string;
107
- classes?: string;
108
- cond?: string;
109
- mentions?: string;
110
- restrictions?: string;
111
- mrz1?: string;
112
- mrz2?: string;
113
- mrz3?: string;
114
- fullNameMrz?: string;
115
- documentNumberCheckDigit?: string;
116
- dateOfBirthCheckDigit?: string;
117
- expirationDateCheckDigit?: string;
118
- fathersName?: string;
119
- mothersName?: string;
120
- federalRevenueNumber?: string;
121
- originDocumentId?: string;
122
- driversLicenseCategory?: string;
123
- controlNumber?: string;
124
- renach?: string;
125
- ocrReliabilityConfidence?: number;
126
- ocrDataConfidence?: unknown;
127
- };
128
- type UpdateOcrDataParams = {
129
- address?: string;
130
- documentNumber?: string;
131
- name?: string;
132
- firstName?: string;
133
- lastName?: string;
134
- paternalLastName?: string;
135
- maternalLastName?: string;
136
- personalNumber?: string;
137
- curp?: string;
138
- email?: string;
139
- birthDate?: string;
140
- expireAt?: string;
141
- gender?: string;
142
- issuingCountry?: string;
143
- };
144
- type ValidationRule = {
145
- type: 'required';
146
- } | {
147
- type: 'minAge';
148
- years: number;
149
- } | {
150
- type: 'cpf';
151
- };
152
- type OcrFieldConfig = {
153
- key: keyof UpdateOcrDataParams;
154
- labelKey: string;
155
- type: 'text' | 'date' | 'radio';
156
- options?: {
157
- label: string;
158
- value: string;
159
- }[];
160
- validation?: ValidationRule[];
161
- required: boolean;
162
- };
163
- type UpdateOcrResponse = {
164
- success: boolean;
165
- };
166
- //#endregion
5
+ import { a as UpdateOcrResponse, i as UpdateOcrDataParams, n as OcrData, t as IdOcrConfig } from "./types-CBJI9n6h.js";
167
6
  //#region src/modules/id-ocr/idOcrStateMachine.d.ts
168
7
  type IdOcrOcrDocument = 'first' | 'second';
169
8
  type IdOcrContext = {
@@ -632,4 +471,4 @@ declare function createIdOcrManagerFromActor(actor: IdOcrActor): Manager<IdOcrSt
632
471
  };
633
472
  type IdOcrManager = ReturnType<typeof createIdOcrManager>;
634
473
  //#endregion
635
- export { IdOcrActor as a, IdOcrConfig as c, UpdateOcrDataParams as d, ValidationRule as f, createIdOcrManagerFromActor as i, OcrData as l, IdOcrState as n, IdOcrOcrDocument as o, createIdOcrManager as r, idOcrStateMachine as s, IdOcrManager as t, OcrFieldConfig as u };
474
+ export { IdOcrActor as a, createIdOcrManagerFromActor as i, IdOcrState as n, IdOcrOcrDocument as o, createIdOcrManager as r, idOcrStateMachine as s, IdOcrManager as t };
@@ -2,69 +2,7 @@ import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorR
2
2
  import "./StateMachine-EDpYWy0i.js";
3
3
  import { t as Manager } from "./Manager-CQQ99QOI.js";
4
4
  import "./Actor-iTq7YY48.js";
5
- //#region src/modules/electronic-signature/types.d.ts
6
- type ElectronicSignatureVariant = 'ae' | 'qe';
7
- type ElectronicSignatureConfig = {
8
- variant?: ElectronicSignatureVariant;
9
- uploadDocument?: boolean;
10
- downloadDocument?: boolean;
11
- };
12
- type ElectronicSignatureDocument = {
13
- documentRef: string;
14
- documentUrl: string;
15
- };
16
- type SignedDocument = {
17
- /**
18
- * Whether the signing endpoint acknowledged this document as signed. Set from
19
- * either the AES signed-PDF URL or the QES `{ success: true }` acknowledgment.
20
- */
21
- signed: boolean;
22
- /**
23
- * URL of the signed PDF when the endpoint returns one (AES `/process/sign`).
24
- * QES `/process/signQes` returns only `{ success: true }` with no document
25
- * URL, so this is absent for the QE variant.
26
- */
27
- signedDocumentUrl?: string;
28
- };
29
- declare const AE_CONSENT_KEYS: readonly ["terms", "signElectronically", "signDisplayed"];
30
- declare const QE_CONSENT_KEYS: readonly ["issuance", "qesAcknowledgement", "qscdConfirmation", "termsAgreement", "documentsReviewed"];
31
- type AeConsentKey = (typeof AE_CONSENT_KEYS)[number];
32
- type QeConsentKey = (typeof QE_CONSENT_KEYS)[number];
33
- type ConsentKey = AeConsentKey | QeConsentKey;
34
- type ConsentChecks = Partial<Record<ConsentKey, boolean>>;
35
- declare function getConsentKeys(variant: ElectronicSignatureVariant): readonly ConsentKey[];
36
- declare function getDefaultConsentChecks(variant: ElectronicSignatureVariant): ConsentChecks;
37
- declare function areAllConsented(checks: ConsentChecks): boolean;
38
- type UnsignedDocsResponse = {
39
- documents: ElectronicSignatureDocument[];
40
- };
41
- type ElectronicSignatureErrorSource = 'upload' | 'fetchDocs' | 'signing';
42
- type ElectronicSignatureContext = {
43
- config: ElectronicSignatureConfig;
44
- getFileData: () => ArrayBuffer | null;
45
- documents: ElectronicSignatureDocument[];
46
- signedDocuments: SignedDocument[];
47
- fileName: string | null;
48
- fileSize: number | null;
49
- fileUrl: string | null;
50
- /**
51
- * Upload destination for the single document this session may hold.
52
- * Generated exactly once (`POST /generateDocumentUploadUrl` creates a
53
- * server-side document) and reused across upload retries so a session can
54
- * never accumulate more than one document — see the AES "two documents"
55
- * bug where a retry created a second, unremovable document.
56
- */
57
- preSignedUrl: string | null;
58
- consentChecks: ConsentChecks;
59
- viewingDocumentUrl: string | null;
60
- errorMessage: string;
61
- errorSource: ElectronicSignatureErrorSource | null;
62
- };
63
- type ElectronicSignatureInput = {
64
- config: ElectronicSignatureConfig;
65
- getFileData: () => ArrayBuffer | null;
66
- };
67
- //#endregion
5
+ import { a as ElectronicSignatureConfig, c as ElectronicSignatureInput, f as SignedDocument, i as ConsentKey, l as ElectronicSignatureVariant, o as ElectronicSignatureContext, p as UnsignedDocsResponse, r as ConsentChecks, s as ElectronicSignatureDocument } from "./types-DWaEoU0I.js";
68
6
  //#region src/modules/electronic-signature/electronicSignatureStateMachine.d.ts
69
7
  declare const electronicSignatureMachine: StateMachine<ElectronicSignatureContext, {
70
8
  type: "LOAD";
@@ -1323,4 +1261,4 @@ declare function createElectronicSignatureManager(options: {
1323
1261
  };
1324
1262
  type ElectronicSignatureManager = ReturnType<typeof createElectronicSignatureManager>;
1325
1263
  //#endregion
1326
- export { AE_CONSENT_KEYS as a, ConsentKey as c, ElectronicSignatureVariant as d, QE_CONSENT_KEYS as f, getDefaultConsentChecks as g, getConsentKeys as h, electronicSignatureMachine as i, ElectronicSignatureConfig as l, areAllConsented as m, ElectronicSignatureState as n, AeConsentKey as o, QeConsentKey as p, createElectronicSignatureManager as r, ConsentChecks as s, ElectronicSignatureManager as t, ElectronicSignatureDocument as u };
1264
+ export { electronicSignatureMachine as i, ElectronicSignatureState as n, createElectronicSignatureManager as r, ElectronicSignatureManager as t };