@incodetech/core 0.0.0-dev-20260819-d97c25cd → 0.0.0-dev-20260819-1f18df1b

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 (99) hide show
  1. package/dist/{BrowserDiagnosticsCryptoProvider-C1kB1eB6.esm.js → BrowserDiagnosticsCryptoProvider-BF9xBaiY.esm.js} +1 -1
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-DlY6lEte.esm.js → apiError-DkvxstPe.esm.js} +1 -1
  4. package/dist/authentication.d.ts +3 -3
  5. package/dist/authentication.esm.js +2 -2
  6. package/dist/{authenticationManager-CG7g38ad.d.ts → authenticationManager-BdJ566eB.d.ts} +1 -1
  7. package/dist/{authenticationManager-C3Pdo3OC.esm.js → authenticationManager-DePerCFv.esm.js} +2 -2
  8. package/dist/{authenticationStateMachine-CpBOgS9i.esm.js → authenticationStateMachine-JTIG9iMY.esm.js} +2 -2
  9. package/dist/consent.d.ts +1 -1
  10. package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-DLOyIZzt.d.ts} +5 -5
  11. package/dist/curp-validation.d.ts +1 -1
  12. package/dist/{curpValidationManager-DrMLHzVF.d.ts → curpValidationManager-B9kKccLg.d.ts} +1 -1
  13. package/dist/{deepsightLoader-Ct8Fmn7_.esm.js → deepsightLoader-DM1qt1rT.esm.js} +3 -3
  14. package/dist/{deepsightService-Dr7sNZ5r.d.ts → deepsightService-Cr6ns2kj.d.ts} +1 -1
  15. package/dist/document-capture.d.ts +2 -2
  16. package/dist/{documentCaptureManager-B3t0ydtg.d.ts → documentCaptureManager-DD0qtFdE.d.ts} +83 -83
  17. package/dist/dynamic-forms.d.ts +2 -2
  18. package/dist/dynamic-forms.esm.js +2 -2
  19. package/dist/{dynamicFormsManager-DhveFHPS.d.ts → dynamicFormsManager-fhK0yINk.d.ts} +1 -1
  20. package/dist/{dynamicFormsManager-CWXstugw.esm.js → dynamicFormsManager-wb7IY6XA.esm.js} +1 -1
  21. package/dist/{dynamicFormsStateMachine-BN5EojBS.esm.js → dynamicFormsStateMachine-BsV6u2O0.esm.js} +1 -1
  22. package/dist/ekyb.d.ts +1 -1
  23. package/dist/ekyb.esm.js +3 -3
  24. package/dist/{ekybManager-CS2eKYaZ.esm.js → ekybManager-DH_IUSU-.esm.js} +1 -1
  25. package/dist/{ekybStateMachine-CUbUpf93.esm.js → ekybStateMachine-D7x2OH2M.esm.js} +1 -1
  26. package/dist/electronic-signature.esm.js +1 -1
  27. package/dist/{electronicSignatureManager-DAV5Qd7D.esm.js → electronicSignatureManager-BXdPZXeF.esm.js} +1 -1
  28. package/dist/extensibility.d.ts +14 -14
  29. package/dist/extensibility.esm.js +9 -9
  30. package/dist/{faceCaptureManagerFactory-CA_aJRiS.esm.js → faceCaptureManagerFactory-AgR9dodj.esm.js} +1 -1
  31. package/dist/{faceCaptureManagerFactory-D6qnBVUw.d.ts → faceCaptureManagerFactory-Crm7rmV-.d.ts} +5 -5
  32. package/dist/{faceCaptureSetup-q_Csi0hg.esm.js → faceCaptureSetup-CAM44ryF.esm.js} +2 -2
  33. package/dist/{feature-management-Cl__Mk57.esm.js → feature-management-BHkGKfmU.esm.js} +1 -1
  34. package/dist/feature-management.esm.js +1 -1
  35. package/dist/flow-events.d.ts +1 -1
  36. package/dist/flow.d.ts +7 -7
  37. package/dist/flow.esm.js +3 -3
  38. package/dist/{flowCompletionService-B0iuFfdZ.esm.js → flowCompletionService-gP3_yh83.esm.js} +1 -1
  39. package/dist/{flowServices-D6lWadVX.esm.js → flowServices-ztQt4eWp.esm.js} +4 -4
  40. package/dist/geolocation.esm.js +2 -2
  41. package/dist/{geolocationManager-CZJwhj_d.esm.js → geolocationManager-BbUhrfZr.esm.js} +1 -1
  42. package/dist/{geolocationStateMachine-BOH8p4nS.esm.js → geolocationStateMachine-BFRFFQmv.esm.js} +1 -1
  43. package/dist/home.d.ts +1 -1
  44. package/dist/id-ocr.d.ts +1 -1
  45. package/dist/id-selfie-flow.d.ts +1 -1
  46. package/dist/id-selfie-flow.esm.js +6 -6
  47. package/dist/id.d.ts +3 -3
  48. package/dist/id.esm.js +3 -3
  49. package/dist/{idCaptureManager-CdJ5tIzZ.esm.js → idCaptureManager-Bk4g-AA-.esm.js} +2 -2
  50. package/dist/{idCaptureManager-CfE4iEi0.d.ts → idCaptureManager-DQEUuleg.d.ts} +4 -4
  51. package/dist/{idCaptureServices-DLNKi_EM.esm.js → idCaptureServices-BAMeTBQC.esm.js} +3 -3
  52. package/dist/{idCaptureStateMachine-C4UMP5JD.esm.js → idCaptureStateMachine-DkOpW_NS.esm.js} +8 -8
  53. package/dist/{idOcrManager-BF_cXZq8.d.ts → idOcrManager-CFlDwUvN.d.ts} +1 -1
  54. package/dist/identity-reuse.d.ts +1 -1
  55. package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-BXEBBI3N.d.ts} +5 -5
  56. package/dist/{index-LA6R9BLR.d.ts → index-B_-QIi8y.d.ts} +1 -1
  57. package/dist/index.esm.js +1 -1
  58. package/dist/mandatory-consent.d.ts +2 -2
  59. package/dist/{mandatoryConsentManager-DbGLEuuz.d.ts → mandatoryConsentManager-CohPXtwL.d.ts} +6 -6
  60. package/dist/{onDeviceFaceResults-RJnRexzw.esm.js → onDeviceFaceResults-EQ6ZXUbf.esm.js} +3 -3
  61. package/dist/personhood.d.ts +3 -3
  62. package/dist/personhood.esm.js +3 -3
  63. package/dist/qe-signature.esm.js +1 -1
  64. package/dist/{recordingService-CLsBGwrX.esm.js → recordingService-Oq-IFeR6.esm.js} +1 -1
  65. package/dist/{runChildModule-btHrg-mD.esm.js → runChildModule-BPrQSI0L.esm.js} +1 -1
  66. package/dist/{sdkVersion-x6P2avb7.esm.js → sdkVersion-Blmw3y8l.esm.js} +1 -1
  67. package/dist/selfie.d.ts +5 -5
  68. package/dist/selfie.esm.js +4 -4
  69. package/dist/{selfieManager-dki4G9tK.d.ts → selfieManager-D03ce0Eq.d.ts} +1 -1
  70. package/dist/{selfieManager-BNRQ9O-F.esm.js → selfieManager-pz0su_lR.esm.js} +2 -2
  71. package/dist/{selfieStateMachine-BCruqTSI.esm.js → selfieStateMachine-BKK3rwVO.esm.js} +2 -2
  72. package/dist/{session-Bgkz0Bl9.esm.js → session-N4qZeM0U.esm.js} +4 -4
  73. package/dist/session.d.ts +1 -1
  74. package/dist/session.esm.js +4 -4
  75. package/dist/{sessionInitializer-BWxNWUni.esm.js → sessionInitializer-g7b74E9N.esm.js} +4 -4
  76. package/dist/{setup-CXsJAvBD.esm.js → setup-CyI63xB9.esm.js} +5 -5
  77. package/dist/trueSight-BUvE_d2r.esm.js +1 -0
  78. package/dist/{trueSightService-C8mkify_.esm.js → trueSightService-B3cP5St3.esm.js} +2 -2
  79. package/dist/types-BMa0ZqAi.d.ts +6 -0
  80. package/dist/{types-isCyg__O.d.ts → types-B_PW_0Wq2.d.ts} +3 -3
  81. package/dist/{types-C6pPfQxo.d.ts → types-BaDB52_j.d.ts} +1 -1
  82. package/dist/{types-DelMqZLe.d.ts → types-BjSly8cp.d.ts} +1 -1
  83. package/dist/{types-BqezaTnP.d.ts → types-CkrawdOy.d.ts} +3 -2
  84. package/dist/{types-D10PIjOT.d.ts → types-R1jpOcvl.d.ts} +1 -1
  85. package/dist/{types-KeV54Tt6.d.ts → types-jBSE34JY.d.ts} +1 -1
  86. package/dist/video-selfie.d.ts +1 -1
  87. package/dist/video-selfie.esm.js +3 -3
  88. package/dist/{videoSelfieCameraWarmer-BwvCvHQQ.esm.js → videoSelfieCameraWarmer-z4FCYKxN.esm.js} +2 -2
  89. package/dist/{videoSelfieStepDetector-tHovquP4.d.ts → videoSelfieStepDetector-g3PJIqyq.d.ts} +3 -3
  90. package/dist/wasm.esm.js +1 -1
  91. package/dist/workflow.d.ts +5 -5
  92. package/dist/workflow.esm.js +15 -15
  93. package/package.json +3 -8
  94. package/dist/document-upload.d.ts +0 -325
  95. package/dist/document-upload.esm.js +0 -197
  96. package/dist/trueSight-CzaYWY8k.esm.js +0 -1
  97. package/dist/types-DQpi7nkW.d.ts +0 -6
  98. package/dist/types-Vb4P9ovf.d.ts +0 -22
  99. /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
@@ -1,325 +0,0 @@
1
- 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, k as MachineSnapshot, m as GetConcreteByKey, o as AnyActorLogic, p as EventObject, r as ActorRef, s as AnyActorRef, u as ConditionalRequired, v as MetaObject, w as Values, x as RequiredLogicInput, y as NonReducibleUnknown } 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 { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-Vb4P9ovf.js";
6
- //#region src/modules/document-upload/documentUploadStateMachine.d.ts
7
- declare const documentUploadMachine: StateMachine<DocumentUploadContext, {
8
- type: "START";
9
- } | {
10
- type: "CAPTURE";
11
- imageBase64: string;
12
- } | {
13
- type: "UPLOAD_PROGRESS";
14
- progress: number;
15
- } | {
16
- type: "RETRY";
17
- } | {
18
- type: "CLOSE";
19
- }, {
20
- [x: string]: ActorRefFromLogic<PromiseActorLogic<void, {
21
- imageBase64: string;
22
- documentType: string;
23
- onProgress: (progress: number) => void;
24
- }, EventObject>> | ActorRefFromLogic<PromiseActorLogic<MediaStream, void, EventObject>> | undefined;
25
- }, Values<{
26
- uploadDocument: {
27
- src: "uploadDocument";
28
- logic: PromiseActorLogic<void, {
29
- imageBase64: string;
30
- documentType: string;
31
- onProgress: (progress: number) => void;
32
- }, EventObject>;
33
- id: string | undefined;
34
- };
35
- initCamera: {
36
- src: "initCamera";
37
- logic: PromiseActorLogic<MediaStream, void, EventObject>;
38
- id: string | undefined;
39
- };
40
- }>, Values<{
41
- setStream: {
42
- type: "setStream";
43
- params: NonReducibleUnknown;
44
- };
45
- setImageAndClearError: {
46
- type: "setImageAndClearError";
47
- params: NonReducibleUnknown;
48
- };
49
- setProgress: {
50
- type: "setProgress";
51
- params: NonReducibleUnknown;
52
- };
53
- setError: {
54
- type: "setError";
55
- params: NonReducibleUnknown;
56
- };
57
- clearError: {
58
- type: "clearError";
59
- params: NonReducibleUnknown;
60
- };
61
- stopStream: {
62
- type: "stopStream";
63
- params: NonReducibleUnknown;
64
- };
65
- }>, never, never, "error" | "idle" | "uploading" | "closed" | "finished" | "initCamera" | "capturing", string, DocumentUploadInput, NonReducibleUnknown, EventObject, MetaObject, {
66
- readonly id: "documentUpload";
67
- readonly initial: "idle";
68
- readonly context: ({ input }: {
69
- spawn: {
70
- <TSrc extends "uploadDocument" | "initCamera">(logic: TSrc, ...[options]: ({
71
- src: "uploadDocument";
72
- logic: PromiseActorLogic<void, {
73
- imageBase64: string;
74
- documentType: string;
75
- onProgress: (progress: number) => void;
76
- }, EventObject>;
77
- id: string | undefined;
78
- } extends (infer T) ? T extends {
79
- src: "uploadDocument";
80
- logic: PromiseActorLogic<void, {
81
- imageBase64: string;
82
- documentType: string;
83
- onProgress: (progress: number) => void;
84
- }, EventObject>;
85
- id: string | undefined;
86
- } ? T extends {
87
- src: TSrc;
88
- } ? ConditionalRequired<[options?: ({
89
- id?: T["id"] | undefined;
90
- systemId?: string;
91
- input?: InputFrom<T["logic"]> | undefined;
92
- syncSnapshot?: boolean;
93
- } & { [K in RequiredActorOptions<T>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T>>> : never : never : never) | ({
94
- src: "initCamera";
95
- logic: PromiseActorLogic<MediaStream, void, EventObject>;
96
- id: string | undefined;
97
- } extends (infer T_1) ? T_1 extends {
98
- src: "initCamera";
99
- logic: PromiseActorLogic<MediaStream, void, EventObject>;
100
- id: string | undefined;
101
- } ? T_1 extends {
102
- src: TSrc;
103
- } ? ConditionalRequired<[options?: ({
104
- id?: T_1["id"] | undefined;
105
- systemId?: string;
106
- input?: InputFrom<T_1["logic"]> | undefined;
107
- syncSnapshot?: boolean;
108
- } & { [K_1 in RequiredActorOptions<T_1>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T_1>>> : never : never : never)): ActorRefFromLogic<GetConcreteByKey<Values<{
109
- uploadDocument: {
110
- src: "uploadDocument";
111
- logic: PromiseActorLogic<void, {
112
- imageBase64: string;
113
- documentType: string;
114
- onProgress: (progress: number) => void;
115
- }, EventObject>;
116
- id: string | undefined;
117
- };
118
- initCamera: {
119
- src: "initCamera";
120
- logic: PromiseActorLogic<MediaStream, void, EventObject>;
121
- id: string | undefined;
122
- };
123
- }>, "src", TSrc>["logic"]>;
124
- <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: ({
125
- id?: never;
126
- systemId?: string;
127
- input?: InputFrom<TLogic> | undefined;
128
- syncSnapshot?: boolean;
129
- } & { [K in RequiredLogicInput<TLogic>]: unknown; }) | undefined], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
130
- };
131
- input: DocumentUploadInput;
132
- self: ActorRef<MachineSnapshot<DocumentUploadContext, {
133
- type: "START";
134
- } | {
135
- type: "CAPTURE";
136
- imageBase64: string;
137
- } | {
138
- type: "UPLOAD_PROGRESS";
139
- progress: number;
140
- } | {
141
- type: "RETRY";
142
- } | {
143
- type: "CLOSE";
144
- }, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, {
145
- type: "START";
146
- } | {
147
- type: "CAPTURE";
148
- imageBase64: string;
149
- } | {
150
- type: "UPLOAD_PROGRESS";
151
- progress: number;
152
- } | {
153
- type: "RETRY";
154
- } | {
155
- type: "CLOSE";
156
- }, AnyEventObject>;
157
- }) => {
158
- config: DocumentUploadConfig;
159
- stream: undefined;
160
- imageBase64: undefined;
161
- progress: number;
162
- error: undefined;
163
- };
164
- readonly states: {
165
- readonly idle: {
166
- readonly on: {
167
- readonly START: {
168
- readonly target: "initCamera";
169
- };
170
- };
171
- };
172
- readonly initCamera: {
173
- readonly invoke: {
174
- readonly id: "initCamera";
175
- readonly src: "initCamera";
176
- readonly input: undefined;
177
- readonly onDone: {
178
- readonly target: "capturing";
179
- readonly actions: "setStream";
180
- };
181
- readonly onError: {
182
- readonly target: "error";
183
- readonly actions: "setError";
184
- };
185
- };
186
- readonly on: {
187
- readonly CLOSE: {
188
- readonly target: "closed";
189
- };
190
- };
191
- };
192
- readonly capturing: {
193
- readonly on: {
194
- readonly CAPTURE: {
195
- readonly target: "uploading";
196
- readonly actions: "setImageAndClearError";
197
- };
198
- readonly CLOSE: {
199
- readonly target: "closed";
200
- readonly actions: "stopStream";
201
- };
202
- };
203
- };
204
- readonly uploading: {
205
- readonly invoke: {
206
- readonly id: "uploadDocument";
207
- readonly src: "uploadDocument";
208
- readonly input: ({ context, self }: {
209
- context: DocumentUploadContext;
210
- event: {
211
- type: "START";
212
- } | {
213
- type: "CAPTURE";
214
- imageBase64: string;
215
- } | {
216
- type: "UPLOAD_PROGRESS";
217
- progress: number;
218
- } | {
219
- type: "RETRY";
220
- } | {
221
- type: "CLOSE";
222
- };
223
- self: ActorRef<MachineSnapshot<DocumentUploadContext, {
224
- type: "START";
225
- } | {
226
- type: "CAPTURE";
227
- imageBase64: string;
228
- } | {
229
- type: "UPLOAD_PROGRESS";
230
- progress: number;
231
- } | {
232
- type: "RETRY";
233
- } | {
234
- type: "CLOSE";
235
- }, Record<string, AnyActorRef>, StateValue, string, unknown, any, any>, {
236
- type: "START";
237
- } | {
238
- type: "CAPTURE";
239
- imageBase64: string;
240
- } | {
241
- type: "UPLOAD_PROGRESS";
242
- progress: number;
243
- } | {
244
- type: "RETRY";
245
- } | {
246
- type: "CLOSE";
247
- }, AnyEventObject>;
248
- }) => {
249
- imageBase64: string;
250
- documentType: string;
251
- onProgress: (progress: number) => void;
252
- };
253
- readonly onDone: {
254
- readonly target: "finished";
255
- readonly actions: "stopStream";
256
- };
257
- readonly onError: {
258
- readonly target: "error";
259
- readonly actions: readonly ["setError", "stopStream"];
260
- };
261
- };
262
- readonly on: {
263
- readonly UPLOAD_PROGRESS: {
264
- readonly actions: "setProgress";
265
- };
266
- };
267
- };
268
- readonly error: {
269
- readonly on: {
270
- readonly RETRY: {
271
- readonly target: "initCamera";
272
- readonly actions: "clearError";
273
- };
274
- readonly CLOSE: {
275
- readonly target: "closed";
276
- readonly actions: "stopStream";
277
- };
278
- };
279
- };
280
- readonly finished: {
281
- readonly type: "final";
282
- };
283
- readonly closed: {
284
- readonly type: "final";
285
- };
286
- };
287
- }>;
288
- //#endregion
289
- //#region src/modules/document-upload/documentUploadActor.d.ts
290
- type CreateDocumentUploadActorOptions = {
291
- config: DocumentUploadConfig;
292
- };
293
- //#endregion
294
- //#region src/modules/document-upload/documentUploadManager.d.ts
295
- type DocumentUploadInitializingState = {
296
- status: 'initializing';
297
- };
298
- type DocumentUploadCapturingState = {
299
- status: 'capturing';
300
- stream: MediaStream;
301
- };
302
- type DocumentUploadUploadingState = {
303
- status: 'uploading';
304
- progress: number;
305
- };
306
- type DocumentUploadErrorState = {
307
- status: 'error';
308
- error: string;
309
- };
310
- type DocumentUploadFinishedState = {
311
- status: 'finished';
312
- };
313
- type DocumentUploadClosedState = {
314
- status: 'closed';
315
- };
316
- type DocumentUploadState = DocumentUploadInitializingState | DocumentUploadCapturingState | DocumentUploadUploadingState | DocumentUploadErrorState | DocumentUploadFinishedState | DocumentUploadClosedState;
317
- declare function createDocumentUploadManager(options: CreateDocumentUploadActorOptions): Manager<DocumentUploadState> & {
318
- load(): void;
319
- capture(imageBase64: string): void;
320
- retry(): void;
321
- close(): void;
322
- };
323
- type DocumentUploadManager = ReturnType<typeof createDocumentUploadManager>;
324
- //#endregion
325
- export { type DocumentUploadConfig, type DocumentUploadManager, type DocumentUploadState, createDocumentUploadManager, documentUploadMachine };
@@ -1,197 +0,0 @@
1
- import { t as api } from "./api-Bx3gKW_y.esm.js";
2
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-DYiyoSlx.esm.js";
3
- import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
4
- import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
- import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
- import { a as stopCameraStream } from "./camera-_2sXMXiF.esm.js";
7
- import { n as getBackCameraStream } from "./backCameraStream-D30zZBEZ.esm.js";
8
- //#region src/modules/document-upload/documentUploadServices.ts
9
- async function uploadDocument({ imageBase64, documentType, onProgress, signal }) {
10
- const url = `${endpoints.addDocument}?type=${encodeURIComponent(documentType)}`;
11
- const response = await api.post(url, { base64Image: imageBase64 }, {
12
- signal,
13
- onUploadProgress: onProgress
14
- });
15
- if (!response.ok) throw new Error(`Document upload failed: ${response.status} ${response.statusText}`);
16
- }
17
- //#endregion
18
- //#region src/modules/document-upload/documentUploadStateMachine.ts
19
- const documentUploadMachine = setup({
20
- types: {
21
- context: {},
22
- events: {},
23
- input: {}
24
- },
25
- actors: {
26
- initCamera: fromPromise(async () => {
27
- const { stream } = await getBackCameraStream(void 0);
28
- return stream;
29
- }),
30
- uploadDocument: fromPromise(async ({ input, signal }) => {
31
- return uploadDocument({
32
- imageBase64: input.imageBase64,
33
- documentType: input.documentType,
34
- onProgress: input.onProgress,
35
- signal
36
- });
37
- })
38
- },
39
- actions: {
40
- setStream: assign(({ event }) => ({ stream: event.output })),
41
- setImageAndClearError: assign(({ event }) => {
42
- return {
43
- imageBase64: event.imageBase64,
44
- error: void 0
45
- };
46
- }),
47
- setProgress: assign(({ event }) => ({ progress: event.progress })),
48
- setError: assign(({ event }) => ({ error: String(event.error) })),
49
- clearError: assign({ error: () => void 0 }),
50
- stopStream: assign(({ context }) => {
51
- if (context.stream) stopCameraStream(context.stream);
52
- return { stream: void 0 };
53
- })
54
- }
55
- }).createMachine({
56
- id: "documentUpload",
57
- initial: "idle",
58
- context: ({ input }) => ({
59
- config: input.config,
60
- stream: void 0,
61
- imageBase64: void 0,
62
- progress: 0,
63
- error: void 0
64
- }),
65
- states: {
66
- idle: { on: { START: { target: "initCamera" } } },
67
- initCamera: {
68
- invoke: {
69
- id: "initCamera",
70
- src: "initCamera",
71
- input: void 0,
72
- onDone: {
73
- target: "capturing",
74
- actions: "setStream"
75
- },
76
- onError: {
77
- target: "error",
78
- actions: "setError"
79
- }
80
- },
81
- on: { CLOSE: { target: "closed" } }
82
- },
83
- capturing: { on: {
84
- CAPTURE: {
85
- target: "uploading",
86
- actions: "setImageAndClearError"
87
- },
88
- CLOSE: {
89
- target: "closed",
90
- actions: "stopStream"
91
- }
92
- } },
93
- uploading: {
94
- invoke: {
95
- id: "uploadDocument",
96
- src: "uploadDocument",
97
- input: ({ context, self }) => {
98
- const imageBase64 = context.imageBase64;
99
- if (!imageBase64) throw new Error("No image to upload");
100
- return {
101
- imageBase64,
102
- documentType: context.config.documentType,
103
- onProgress: (progress) => {
104
- self.send({
105
- type: "UPLOAD_PROGRESS",
106
- progress
107
- });
108
- }
109
- };
110
- },
111
- onDone: {
112
- target: "finished",
113
- actions: "stopStream"
114
- },
115
- onError: {
116
- target: "error",
117
- actions: ["setError", "stopStream"]
118
- }
119
- },
120
- on: { UPLOAD_PROGRESS: { actions: "setProgress" } }
121
- },
122
- error: { on: {
123
- RETRY: {
124
- target: "initCamera",
125
- actions: "clearError"
126
- },
127
- CLOSE: {
128
- target: "closed",
129
- actions: "stopStream"
130
- }
131
- } },
132
- finished: { type: "final" },
133
- closed: { type: "final" }
134
- }
135
- });
136
- //#endregion
137
- //#region src/modules/document-upload/documentUploadActor.ts
138
- function createDocumentUploadActor(options) {
139
- return createActor(documentUploadMachine, { input: { config: options.config } }).start();
140
- }
141
- //#endregion
142
- //#region src/modules/document-upload/documentUploadManager.ts
143
- function mapState(snapshot) {
144
- const typedSnapshot = snapshot;
145
- const { context } = typedSnapshot;
146
- if (typedSnapshot.matches("idle") || typedSnapshot.matches("initCamera")) return { status: "initializing" };
147
- if (typedSnapshot.matches("capturing")) {
148
- if (!context.stream) return { status: "initializing" };
149
- return {
150
- status: "capturing",
151
- stream: context.stream
152
- };
153
- }
154
- if (typedSnapshot.matches("uploading")) return {
155
- status: "uploading",
156
- progress: context.progress
157
- };
158
- if (typedSnapshot.matches("error")) return {
159
- status: "error",
160
- error: context.error ?? "Upload failed"
161
- };
162
- if (typedSnapshot.matches("finished")) return { status: "finished" };
163
- if (typedSnapshot.matches("closed")) return { status: "closed" };
164
- return { status: "initializing" };
165
- }
166
- function createApi({ actor, trackElementClicked }) {
167
- return {
168
- load() {
169
- actor.send({ type: "START" });
170
- },
171
- capture(imageBase64) {
172
- trackElementClicked?.("capture");
173
- actor.send({
174
- type: "CAPTURE",
175
- imageBase64
176
- });
177
- },
178
- retry() {
179
- trackElementClicked?.("retry");
180
- actor.send({ type: "RETRY" });
181
- },
182
- close() {
183
- trackElementClicked?.("close");
184
- actor.send({ type: "CLOSE" });
185
- }
186
- };
187
- }
188
- function createDocumentUploadManager(options) {
189
- return createManager({
190
- actor: createDocumentUploadActor(options),
191
- mapState,
192
- createApi,
193
- instrumentation: createManagerInstrumentation(eventModuleNames.documentUpload)
194
- });
195
- }
196
- //#endregion
197
- export { createDocumentUploadManager, documentUploadMachine };
@@ -1 +0,0 @@
1
- import "./trueSightService-C8mkify_.esm.js";
@@ -1,6 +0,0 @@
1
- import { i as FlowModuleConfig } from "./types-BqezaTnP.js";
2
- import { t as BaseFaceCaptureConfig } from "./types-KeV54Tt6.js";
3
- //#region src/modules/authentication/types.d.ts
4
- type AuthenticationConfig = FlowModuleConfig['AUTHENTICATION'] & BaseFaceCaptureConfig;
5
- //#endregion
6
- export { AuthenticationConfig as t };
@@ -1,22 +0,0 @@
1
- import { t as CameraStream } from "./camera-9wWD-pwg.js";
2
- //#region src/modules/document-upload/types.d.ts
3
- /**
4
- * Configuration for document upload (e.g., third ID capture).
5
- * The documentType determines the backend endpoint query parameter.
6
- */
7
- type DocumentUploadConfig = {
8
- /** Document type for the upload endpoint (e.g., 'thirdId') */
9
- documentType: string;
10
- };
11
- type DocumentUploadContext = {
12
- config: DocumentUploadConfig;
13
- stream: CameraStream | undefined;
14
- imageBase64: string | undefined;
15
- progress: number;
16
- error: string | undefined;
17
- };
18
- type DocumentUploadInput = {
19
- config: DocumentUploadConfig;
20
- };
21
- //#endregion
22
- export { DocumentUploadContext as n, DocumentUploadInput as r, DocumentUploadConfig as t };