@incodetech/core 0.0.0-dev-20260402-7cf9db4 → 0.0.0-dev-20260402-0dc2fb9
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.
- package/dist/{Manager-D_DMzMWz.esm.js → Manager-B-qS9P9T.esm.js} +1 -1
- package/dist/{StreamCanvasCapture-9VAzOfOv.esm.js → StreamCanvasCapture-BowJVbkC.esm.js} +1 -1
- package/dist/{addressSearch-CYGzuJJ3.esm.js → addressSearch-CmmLAvRi.esm.js} +2 -2
- package/dist/authentication.esm.js +5 -5
- package/dist/{authenticationManager-C9iQ1d2a.esm.js → authenticationManager-BzsB0zC8.esm.js} +4 -4
- package/dist/consent.d.ts +53 -53
- package/dist/consent.esm.js +2 -2
- package/dist/curp-validation.esm.js +2 -2
- package/dist/document-capture.d.ts +348 -79
- package/dist/document-capture.esm.js +170 -45
- package/dist/document-upload.d.ts +49 -49
- package/dist/document-upload.esm.js +2 -2
- package/dist/ekyb.esm.js +5 -5
- package/dist/ekyc.esm.js +3 -3
- package/dist/email.esm.js +3 -3
- package/dist/{emailManager-C5GCSw78.esm.js → emailManager-E3Cr6KIG.esm.js} +2 -2
- package/dist/{endpoints-CCuj1KZH.esm.js → endpoints-DEXxYYFi.esm.js} +1 -0
- package/dist/extensibility.esm.js +10 -17
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureSetup-DYRykM5Y.esm.js → faceCaptureSetup-Bc7QPf-C.esm.js} +3 -3
- package/dist/flow.esm.js +5 -5
- package/dist/{flowCompletionService-CBvXiMKa.esm.js → flowCompletionService-CUT-cibE.esm.js} +1 -1
- package/dist/{flowServices-CQ3rTJLE.esm.js → flowServices-GUqxIdRY.esm.js} +2 -2
- package/dist/geolocation.esm.js +2 -2
- package/dist/government-validation.esm.js +2 -2
- package/dist/id.esm.js +5 -5
- package/dist/{idCaptureManager-D5rjCu9r.esm.js → idCaptureManager-1x6DxWdp.esm.js} +4 -4
- package/dist/index.esm.js +5 -5
- package/dist/mandatory-consent.d.ts +47 -47
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/phone.esm.js +3 -3
- package/dist/{phoneManager-CQJim-Ky.esm.js → phoneManager-B0ZiIWOO.esm.js} +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/selfie.esm.js +5 -5
- package/dist/{selfieManager-DYW1C2GP.esm.js → selfieManager-CtfKnz4C.esm.js} +3 -3
- package/dist/{session-TBPhHmyy.esm.js → session-CIxnj9Wm.esm.js} +10 -3
- package/dist/session.esm.js +2 -2
- package/dist/signature.esm.js +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./platform-B3nGssGZ.esm.js";
|
|
2
2
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
3
|
-
import { C as fromPromise, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-
|
|
4
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
+
import { C as fromPromise, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-B-qS9P9T.esm.js";
|
|
4
|
+
import { t as endpoints } from "./endpoints-DEXxYYFi.esm.js";
|
|
5
5
|
import { i as stopCameraStream } from "./camera-D-MPXRbZ.esm.js";
|
|
6
6
|
import { t as getBackCameraStream } from "./backCameraStream-BJwEXNl4.esm.js";
|
|
7
7
|
|
|
@@ -22,25 +22,36 @@ const MULTI_PAGE_TYPES = [
|
|
|
22
22
|
];
|
|
23
23
|
const DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
24
24
|
const DEFAULT_CAPTURE_ATTEMPTS = 3;
|
|
25
|
+
const OTHER_DOCUMENT_TYPES = new Set([
|
|
26
|
+
"otherDocument1",
|
|
27
|
+
"otherDocument2",
|
|
28
|
+
"otherDocument3"
|
|
29
|
+
]);
|
|
25
30
|
const DOCUMENT_CAPTURE_ERROR_CODES = {
|
|
26
31
|
FILE_TOO_LARGE: "FILE_TOO_LARGE",
|
|
27
32
|
UPLOAD_FAILED: "UPLOAD_FAILED"
|
|
28
33
|
};
|
|
34
|
+
const DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES = { UNEXPECTED_ERROR: "UNEXPECTED_ERROR" };
|
|
29
35
|
|
|
30
36
|
//#endregion
|
|
31
37
|
//#region src/modules/document-capture/documentCaptureUploadService.ts
|
|
38
|
+
function isMultiPageDocumentType(processingType) {
|
|
39
|
+
return MULTI_PAGE_TYPES.includes(processingType);
|
|
40
|
+
}
|
|
41
|
+
function normalizeProcessingType(processingType) {
|
|
42
|
+
return PROCESSING_TYPE_MAP[processingType] ?? processingType;
|
|
43
|
+
}
|
|
44
|
+
function buildUrl(baseUrl, type, format) {
|
|
45
|
+
return `${baseUrl}?type=${encodeURIComponent(type)}&format=${format}`;
|
|
46
|
+
}
|
|
32
47
|
function resolveUploadUrl(processingType, fileFormat) {
|
|
33
48
|
const format = fileFormat === "application/pdf" ? "pdf" : "image";
|
|
34
|
-
const resolvedType =
|
|
35
|
-
if (
|
|
36
|
-
if (resolvedType === "carInvoice") return
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"otherDocument3"
|
|
41
|
-
].includes(resolvedType)) return `${endpoints.addDocument}?type=${encodeURIComponent(resolvedType)}&format=${format}`;
|
|
42
|
-
if (resolvedType === "addressStatement" || !resolvedType) return `${endpoints.addressStatement}?type=${encodeURIComponent(resolvedType || "addressStatement")}&format=${format}`;
|
|
43
|
-
return `${endpoints.addressStatement}?type=${encodeURIComponent(processingType)}&format=${format}`;
|
|
49
|
+
const resolvedType = normalizeProcessingType(processingType);
|
|
50
|
+
if (isMultiPageDocumentType(resolvedType)) return buildUrl(endpoints.documentV3, resolvedType, format);
|
|
51
|
+
if (resolvedType === "carInvoice") return buildUrl(endpoints.cfdi, resolvedType, format);
|
|
52
|
+
if (OTHER_DOCUMENT_TYPES.has(resolvedType)) return buildUrl(endpoints.addDocument, resolvedType, format);
|
|
53
|
+
if (resolvedType === "addressStatement" || !resolvedType) return buildUrl(endpoints.addressStatement, resolvedType || "addressStatement", format);
|
|
54
|
+
return buildUrl(endpoints.addressStatement, processingType, format);
|
|
44
55
|
}
|
|
45
56
|
async function uploadDocumentCapture({ base64Image, processingType, fileFormat, onProgress, signal }) {
|
|
46
57
|
const url = resolveUploadUrl(processingType, fileFormat);
|
|
@@ -50,9 +61,26 @@ async function uploadDocumentCapture({ base64Image, processingType, fileFormat,
|
|
|
50
61
|
onUploadProgress: onProgress
|
|
51
62
|
});
|
|
52
63
|
if (!response.ok) throw new Error(`Document upload failed: ${response.status}`);
|
|
53
|
-
if (!(response.data.success || response.data.status === "ADD_NEXT_PAGE")) throw new Error("Document upload rejected by server");
|
|
64
|
+
if (!(response.data.success || response.data.status === "SUCCESS" || response.data.status === "ADD_NEXT_PAGE" || response.data.status === "OPTIONAL_PAGE_CAPTURE")) throw new Error("Document upload rejected by server");
|
|
54
65
|
return response.data;
|
|
55
66
|
}
|
|
67
|
+
function resolveMultiPageDocumentType(processingType) {
|
|
68
|
+
const resolvedType = normalizeProcessingType(processingType);
|
|
69
|
+
return isMultiPageDocumentType(resolvedType) ? resolvedType : null;
|
|
70
|
+
}
|
|
71
|
+
async function finalizeDocument({ processingType, signal }) {
|
|
72
|
+
const type = resolveMultiPageDocumentType(processingType);
|
|
73
|
+
if (!type) throw new Error(`finalizeDocument only supports multi-page types (${MULTI_PAGE_TYPES.join(", ")})`);
|
|
74
|
+
const response = await api.post(endpoints.finalizeDocument, { type }, { signal });
|
|
75
|
+
if (!response.ok) throw new Error(`Document finalize failed: ${response.status}`);
|
|
76
|
+
const data = response.data;
|
|
77
|
+
if (!data) throw new Error("Document finalize rejected by server");
|
|
78
|
+
if (!(data.success || data.status === "SUCCESS")) {
|
|
79
|
+
const serverStatus = typeof data.status === "string" ? data.status : "unknown";
|
|
80
|
+
throw new Error(`Document finalize rejected by server (status: ${serverStatus})`);
|
|
81
|
+
}
|
|
82
|
+
return data;
|
|
83
|
+
}
|
|
56
84
|
|
|
57
85
|
//#endregion
|
|
58
86
|
//#region src/modules/document-capture/documentCaptureStateMachine.ts
|
|
@@ -74,6 +102,12 @@ const documentCaptureMachine = setup({
|
|
|
74
102
|
onProgress: input.onProgress,
|
|
75
103
|
signal
|
|
76
104
|
});
|
|
105
|
+
}),
|
|
106
|
+
finalizeDocumentRequest: fromPromise(async ({ input, signal }) => {
|
|
107
|
+
return finalizeDocument({
|
|
108
|
+
processingType: input.processingType,
|
|
109
|
+
signal
|
|
110
|
+
});
|
|
77
111
|
})
|
|
78
112
|
},
|
|
79
113
|
actions: {
|
|
@@ -92,25 +126,34 @@ const documentCaptureMachine = setup({
|
|
|
92
126
|
setFileTooLargeError: assign({ error: () => DOCUMENT_CAPTURE_ERROR_CODES.FILE_TOO_LARGE }),
|
|
93
127
|
setProgress: assign(({ event }) => ({ progress: event.progress })),
|
|
94
128
|
setUploadError: assign({ error: () => DOCUMENT_CAPTURE_ERROR_CODES.UPLOAD_FAILED }),
|
|
129
|
+
setFinalizeError: assign({ error: () => DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES.UNEXPECTED_ERROR }),
|
|
95
130
|
decrementAttemptsRemaining: assign(({ context }) => ({ attemptsRemaining: context.attemptsRemaining - 1 })),
|
|
96
131
|
setCaptureMethodFile: assign({ captureMethod: () => "file" }),
|
|
97
132
|
setCaptureMethodCamera: assign({ captureMethod: () => "camera" }),
|
|
133
|
+
setCaptureMethodGallery: assign({ captureMethod: () => "gallery" }),
|
|
98
134
|
clearCapturedDocument: assign({
|
|
99
135
|
capturedDocument: () => void 0,
|
|
100
136
|
captureMethod: () => void 0,
|
|
101
137
|
progress: () => 0,
|
|
102
138
|
error: () => void 0
|
|
103
139
|
}),
|
|
104
|
-
|
|
105
|
-
|
|
140
|
+
clearCapturedDocumentGalleryRetake: assign({
|
|
141
|
+
capturedDocument: () => void 0,
|
|
142
|
+
progress: () => 0,
|
|
143
|
+
error: () => void 0
|
|
144
|
+
}),
|
|
145
|
+
setNextPageType: assign(({ context, event }) => {
|
|
146
|
+
const { status } = event.output;
|
|
147
|
+
if (context.captureMethod === "file" && context.capturedDocument?.fileType === "application/pdf") return { nextPageType: "none" };
|
|
148
|
+
return { nextPageType: status === "ADD_NEXT_PAGE" ? "required" : status === "OPTIONAL_PAGE_CAPTURE" ? "optional" : "none" };
|
|
106
149
|
}),
|
|
107
150
|
clearForNextPage: assign(({ context }) => ({
|
|
108
151
|
capturedDocument: void 0,
|
|
109
|
-
captureMethod: void 0,
|
|
110
152
|
progress: 0,
|
|
111
153
|
error: void 0,
|
|
112
|
-
|
|
113
|
-
|
|
154
|
+
pageNumber: context.pageNumber + 1,
|
|
155
|
+
nextPageType: "none",
|
|
156
|
+
captureMethod: void 0
|
|
114
157
|
})),
|
|
115
158
|
clearError: assign({ error: () => void 0 }),
|
|
116
159
|
resetProgress: assign({ progress: () => 0 }),
|
|
@@ -124,13 +167,22 @@ const documentCaptureMachine = setup({
|
|
|
124
167
|
fileSizeOk: ({ context, event }) => {
|
|
125
168
|
return event.file.size <= context.config.maxFileSize;
|
|
126
169
|
},
|
|
127
|
-
hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 0,
|
|
128
170
|
canRetryCamera: ({ context }) => context.attemptsRemaining > 0 && context.captureMethod === "camera",
|
|
129
171
|
canRetryFile: ({ context }) => context.attemptsRemaining > 0 && context.captureMethod !== "camera",
|
|
130
172
|
attemptsExhausted: ({ context }) => context.attemptsRemaining <= 0,
|
|
131
173
|
isCameraMode: ({ context }) => context.config.captureMode === "camera",
|
|
132
|
-
|
|
133
|
-
|
|
174
|
+
isCaptureMethodCamera: ({ context }) => context.captureMethod === "camera",
|
|
175
|
+
isCaptureMethodGallery: ({ context }) => context.captureMethod === "gallery",
|
|
176
|
+
isCaptureMethodFile: ({ context }) => context.captureMethod === "file",
|
|
177
|
+
isNextPageOptional: ({ context }) => context.nextPageType === "optional",
|
|
178
|
+
isNextPageRequired: ({ context }) => context.nextPageType === "required",
|
|
179
|
+
canFinalizeOptionalPages: ({ context }) => context.nextPageType === "optional" && resolveMultiPageDocumentType(context.config.processingType) !== null,
|
|
180
|
+
fileSizeOkForGallery: ({ context, event }) => {
|
|
181
|
+
return event.file.size <= context.config.maxFileSize && context.captureMethod === "gallery";
|
|
182
|
+
},
|
|
183
|
+
fileSizeOkForNonGallery: ({ context, event }) => {
|
|
184
|
+
return event.file.size <= context.config.maxFileSize && context.captureMethod !== "gallery";
|
|
185
|
+
}
|
|
134
186
|
}
|
|
135
187
|
}).createMachine({
|
|
136
188
|
id: "documentCapture",
|
|
@@ -157,7 +209,7 @@ const documentCaptureMachine = setup({
|
|
|
157
209
|
error: void 0,
|
|
158
210
|
attemptsRemaining: captureAttempts,
|
|
159
211
|
pageNumber: 1,
|
|
160
|
-
|
|
212
|
+
nextPageType: "none"
|
|
161
213
|
};
|
|
162
214
|
},
|
|
163
215
|
states: {
|
|
@@ -197,14 +249,22 @@ const documentCaptureMachine = setup({
|
|
|
197
249
|
on: { CLOSE: { target: "closed" } }
|
|
198
250
|
},
|
|
199
251
|
capturing: { on: {
|
|
200
|
-
FILE_SELECTED: [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
252
|
+
FILE_SELECTED: [
|
|
253
|
+
{
|
|
254
|
+
target: "preview",
|
|
255
|
+
guard: "fileSizeOkForGallery",
|
|
256
|
+
actions: "setCapturedDocument"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
target: "preview",
|
|
260
|
+
guard: "fileSizeOkForNonGallery",
|
|
261
|
+
actions: ["setCapturedDocument", "setCaptureMethodCamera"]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
target: "capturing",
|
|
265
|
+
actions: "setFileTooLargeError"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
208
268
|
CLOSE: {
|
|
209
269
|
target: "closed",
|
|
210
270
|
actions: "stopStream"
|
|
@@ -215,14 +275,22 @@ const documentCaptureMachine = setup({
|
|
|
215
275
|
target: "uploading",
|
|
216
276
|
actions: "resetProgress"
|
|
217
277
|
},
|
|
218
|
-
RETAKE: [
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
278
|
+
RETAKE: [
|
|
279
|
+
{
|
|
280
|
+
target: "tutorial",
|
|
281
|
+
guard: "isCaptureMethodFile",
|
|
282
|
+
actions: "clearCapturedDocument"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
target: "capturing",
|
|
286
|
+
guard: "isCaptureMethodGallery",
|
|
287
|
+
actions: "clearCapturedDocumentGalleryRetake"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
target: "capturing",
|
|
291
|
+
actions: "clearCapturedDocument"
|
|
292
|
+
}
|
|
293
|
+
],
|
|
226
294
|
CLOSE: {
|
|
227
295
|
target: "closed",
|
|
228
296
|
actions: "stopStream"
|
|
@@ -247,7 +315,7 @@ const documentCaptureMachine = setup({
|
|
|
247
315
|
},
|
|
248
316
|
onDone: {
|
|
249
317
|
target: "success",
|
|
250
|
-
actions: ["
|
|
318
|
+
actions: ["setNextPageType", "stopStream"]
|
|
251
319
|
},
|
|
252
320
|
onError: {
|
|
253
321
|
target: "failure",
|
|
@@ -260,11 +328,45 @@ const documentCaptureMachine = setup({
|
|
|
260
328
|
},
|
|
261
329
|
on: { UPLOAD_PROGRESS: { actions: "setProgress" } }
|
|
262
330
|
},
|
|
263
|
-
success: { on: {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
331
|
+
success: { on: {
|
|
332
|
+
CONTINUE: [
|
|
333
|
+
{
|
|
334
|
+
target: "nextPage",
|
|
335
|
+
guard: "isNextPageOptional"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
target: "nextPage",
|
|
339
|
+
guard: "isNextPageRequired"
|
|
340
|
+
},
|
|
341
|
+
{ target: "finished" }
|
|
342
|
+
],
|
|
343
|
+
CLOSE: { target: "closed" }
|
|
344
|
+
} },
|
|
345
|
+
nextPage: { on: {
|
|
346
|
+
NEXT_PAGE_CAMERA: {
|
|
347
|
+
target: "initCamera",
|
|
348
|
+
actions: ["clearForNextPage", "setCaptureMethodCamera"]
|
|
349
|
+
},
|
|
350
|
+
NEXT_PAGE_PHOTO_LIBRARY: {
|
|
351
|
+
target: "capturing",
|
|
352
|
+
actions: ["clearForNextPage", "setCaptureMethodGallery"]
|
|
353
|
+
},
|
|
354
|
+
ALL_PAGES_CAPTURED: [{
|
|
355
|
+
target: "finalizing",
|
|
356
|
+
guard: "canFinalizeOptionalPages"
|
|
357
|
+
}, { target: "finished" }],
|
|
358
|
+
CLOSE: { target: "closed" }
|
|
359
|
+
} },
|
|
360
|
+
finalizing: { invoke: {
|
|
361
|
+
id: "finalizeDocument",
|
|
362
|
+
src: "finalizeDocumentRequest",
|
|
363
|
+
input: ({ context }) => ({ processingType: context.config.processingType }),
|
|
364
|
+
onDone: { target: "finished" },
|
|
365
|
+
onError: {
|
|
366
|
+
target: "failure",
|
|
367
|
+
actions: "setFinalizeError"
|
|
368
|
+
}
|
|
369
|
+
} },
|
|
268
370
|
failure: {
|
|
269
371
|
on: {
|
|
270
372
|
RETRY: [{
|
|
@@ -316,6 +418,7 @@ function mapState(snapshot) {
|
|
|
316
418
|
status: "capturing",
|
|
317
419
|
stream: context.stream,
|
|
318
420
|
captureMode: context.config.captureMode,
|
|
421
|
+
captureMethod: context.captureMethod,
|
|
319
422
|
error: context.error,
|
|
320
423
|
pageNumber: context.pageNumber
|
|
321
424
|
};
|
|
@@ -337,7 +440,7 @@ function mapState(snapshot) {
|
|
|
337
440
|
imageBase64: context.capturedDocument?.imageBase64 ?? "",
|
|
338
441
|
fileType: context.capturedDocument?.fileType ?? "",
|
|
339
442
|
fileName: context.capturedDocument?.file.name ?? "",
|
|
340
|
-
|
|
443
|
+
nextPageType: context.nextPageType
|
|
341
444
|
};
|
|
342
445
|
if (typedSnapshot.matches("failure")) return {
|
|
343
446
|
status: "failure",
|
|
@@ -346,6 +449,16 @@ function mapState(snapshot) {
|
|
|
346
449
|
};
|
|
347
450
|
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
348
451
|
if (typedSnapshot.matches("closed")) return { status: "closed" };
|
|
452
|
+
if (typedSnapshot.matches("nextPage")) return {
|
|
453
|
+
status: "nextPage",
|
|
454
|
+
imageBase64: context.capturedDocument?.imageBase64 ?? "",
|
|
455
|
+
fileType: context.capturedDocument?.fileType ?? "",
|
|
456
|
+
fileName: context.capturedDocument?.file.name ?? "",
|
|
457
|
+
pageNumber: context.pageNumber,
|
|
458
|
+
nextPageType: context.nextPageType,
|
|
459
|
+
captureMode: context.config.captureMode
|
|
460
|
+
};
|
|
461
|
+
if (typedSnapshot.matches("finalizing")) return { status: "finalizing" };
|
|
349
462
|
return {
|
|
350
463
|
status: "tutorial",
|
|
351
464
|
title: void 0,
|
|
@@ -393,6 +506,18 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
393
506
|
close() {
|
|
394
507
|
trackElementClicked?.("close");
|
|
395
508
|
actor.send({ type: "CLOSE" });
|
|
509
|
+
},
|
|
510
|
+
captureNextPageFromCamera() {
|
|
511
|
+
trackElementClicked?.("captureNextPageFromCamera");
|
|
512
|
+
actor.send({ type: "NEXT_PAGE_CAMERA" });
|
|
513
|
+
},
|
|
514
|
+
captureNextPageFromFile() {
|
|
515
|
+
trackElementClicked?.("captureNextPageFromFile");
|
|
516
|
+
actor.send({ type: "NEXT_PAGE_PHOTO_LIBRARY" });
|
|
517
|
+
},
|
|
518
|
+
finishPageCapture() {
|
|
519
|
+
trackElementClicked?.("finishPageCapture");
|
|
520
|
+
actor.send({ type: "ALL_PAGES_CAPTURED" });
|
|
396
521
|
}
|
|
397
522
|
};
|
|
398
523
|
}
|
|
@@ -2,10 +2,10 @@ import "./Actor-phIcsUhv.js";
|
|
|
2
2
|
import "./camera-Dv2WEhGe.js";
|
|
3
3
|
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-BWGxcjiZ.js";
|
|
4
4
|
import { t as Manager } from "./Manager-BndLda4_.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as xstate0 from "xstate";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
8
|
-
declare const documentUploadMachine:
|
|
8
|
+
declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext, {
|
|
9
9
|
type: "START";
|
|
10
10
|
} | {
|
|
11
11
|
type: "CAPTURE";
|
|
@@ -18,52 +18,52 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
18
18
|
} | {
|
|
19
19
|
type: "CLOSE";
|
|
20
20
|
}, {
|
|
21
|
-
[x: string]:
|
|
21
|
+
[x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
|
|
22
22
|
imageBase64: string;
|
|
23
23
|
documentType: string;
|
|
24
24
|
onProgress: (progress: number) => void;
|
|
25
|
-
},
|
|
26
|
-
},
|
|
25
|
+
}, xstate0.EventObject>> | undefined;
|
|
26
|
+
}, xstate0.Values<{
|
|
27
27
|
initCamera: {
|
|
28
28
|
src: "initCamera";
|
|
29
|
-
logic:
|
|
29
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
30
30
|
id: string | undefined;
|
|
31
31
|
};
|
|
32
32
|
uploadDocument: {
|
|
33
33
|
src: "uploadDocument";
|
|
34
|
-
logic:
|
|
34
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
35
35
|
imageBase64: string;
|
|
36
36
|
documentType: string;
|
|
37
37
|
onProgress: (progress: number) => void;
|
|
38
|
-
},
|
|
38
|
+
}, xstate0.EventObject>;
|
|
39
39
|
id: string | undefined;
|
|
40
40
|
};
|
|
41
|
-
}>,
|
|
42
|
-
setError: {
|
|
43
|
-
type: "setError";
|
|
44
|
-
params: xstate140.NonReducibleUnknown;
|
|
45
|
-
};
|
|
46
|
-
clearError: {
|
|
47
|
-
type: "clearError";
|
|
48
|
-
params: xstate140.NonReducibleUnknown;
|
|
49
|
-
};
|
|
41
|
+
}>, xstate0.Values<{
|
|
50
42
|
setStream: {
|
|
51
43
|
type: "setStream";
|
|
52
|
-
params:
|
|
44
|
+
params: xstate0.NonReducibleUnknown;
|
|
45
|
+
};
|
|
46
|
+
setImageAndClearError: {
|
|
47
|
+
type: "setImageAndClearError";
|
|
48
|
+
params: xstate0.NonReducibleUnknown;
|
|
53
49
|
};
|
|
54
50
|
setProgress: {
|
|
55
51
|
type: "setProgress";
|
|
56
|
-
params:
|
|
52
|
+
params: xstate0.NonReducibleUnknown;
|
|
53
|
+
};
|
|
54
|
+
setError: {
|
|
55
|
+
type: "setError";
|
|
56
|
+
params: xstate0.NonReducibleUnknown;
|
|
57
|
+
};
|
|
58
|
+
clearError: {
|
|
59
|
+
type: "clearError";
|
|
60
|
+
params: xstate0.NonReducibleUnknown;
|
|
57
61
|
};
|
|
58
62
|
stopStream: {
|
|
59
63
|
type: "stopStream";
|
|
60
|
-
params:
|
|
61
|
-
};
|
|
62
|
-
setImageAndClearError: {
|
|
63
|
-
type: "setImageAndClearError";
|
|
64
|
-
params: xstate140.NonReducibleUnknown;
|
|
64
|
+
params: xstate0.NonReducibleUnknown;
|
|
65
65
|
};
|
|
66
|
-
}>, never, never, "
|
|
66
|
+
}>, never, never, "initCamera" | "error" | "idle" | "capturing" | "closed" | "uploading" | "finished", string, DocumentUploadInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
|
|
67
67
|
readonly id: "documentUpload";
|
|
68
68
|
readonly initial: "idle";
|
|
69
69
|
readonly context: ({
|
|
@@ -72,67 +72,67 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
72
72
|
spawn: {
|
|
73
73
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
74
74
|
src: "initCamera";
|
|
75
|
-
logic:
|
|
75
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
76
76
|
id: string | undefined;
|
|
77
77
|
} extends infer T ? T extends {
|
|
78
78
|
src: "initCamera";
|
|
79
|
-
logic:
|
|
79
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
80
80
|
id: string | undefined;
|
|
81
81
|
} ? T extends {
|
|
82
82
|
src: TSrc;
|
|
83
|
-
} ?
|
|
83
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
84
84
|
id?: T["id"] | undefined;
|
|
85
85
|
systemId?: string;
|
|
86
|
-
input?:
|
|
86
|
+
input?: xstate0.InputFrom<T["logic"]> | undefined;
|
|
87
87
|
syncSnapshot?: boolean;
|
|
88
|
-
} & { [K in
|
|
88
|
+
} & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
89
89
|
src: "uploadDocument";
|
|
90
|
-
logic:
|
|
90
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
91
91
|
imageBase64: string;
|
|
92
92
|
documentType: string;
|
|
93
93
|
onProgress: (progress: number) => void;
|
|
94
|
-
},
|
|
94
|
+
}, xstate0.EventObject>;
|
|
95
95
|
id: string | undefined;
|
|
96
96
|
} extends infer T_1 ? T_1 extends {
|
|
97
97
|
src: "uploadDocument";
|
|
98
|
-
logic:
|
|
98
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
99
99
|
imageBase64: string;
|
|
100
100
|
documentType: string;
|
|
101
101
|
onProgress: (progress: number) => void;
|
|
102
|
-
},
|
|
102
|
+
}, xstate0.EventObject>;
|
|
103
103
|
id: string | undefined;
|
|
104
104
|
} ? T_1 extends {
|
|
105
105
|
src: TSrc;
|
|
106
|
-
} ?
|
|
106
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
107
107
|
id?: T_1["id"] | undefined;
|
|
108
108
|
systemId?: string;
|
|
109
|
-
input?:
|
|
109
|
+
input?: xstate0.InputFrom<T_1["logic"]> | undefined;
|
|
110
110
|
syncSnapshot?: boolean;
|
|
111
|
-
} & { [K_1 in
|
|
111
|
+
} & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
|
|
112
112
|
initCamera: {
|
|
113
113
|
src: "initCamera";
|
|
114
|
-
logic:
|
|
114
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
};
|
|
117
117
|
uploadDocument: {
|
|
118
118
|
src: "uploadDocument";
|
|
119
|
-
logic:
|
|
119
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
120
120
|
imageBase64: string;
|
|
121
121
|
documentType: string;
|
|
122
122
|
onProgress: (progress: number) => void;
|
|
123
|
-
},
|
|
123
|
+
}, xstate0.EventObject>;
|
|
124
124
|
id: string | undefined;
|
|
125
125
|
};
|
|
126
126
|
}>, "src", TSrc>["logic"]>;
|
|
127
|
-
<TLogic extends
|
|
127
|
+
<TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
|
|
128
128
|
id?: never;
|
|
129
129
|
systemId?: string;
|
|
130
|
-
input?:
|
|
130
|
+
input?: xstate0.InputFrom<TLogic> | undefined;
|
|
131
131
|
syncSnapshot?: boolean;
|
|
132
|
-
} & { [K in
|
|
132
|
+
} & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
|
|
133
133
|
};
|
|
134
134
|
input: DocumentUploadInput;
|
|
135
|
-
self:
|
|
135
|
+
self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
|
|
136
136
|
type: "START";
|
|
137
137
|
} | {
|
|
138
138
|
type: "CAPTURE";
|
|
@@ -144,7 +144,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
144
144
|
type: "RETRY";
|
|
145
145
|
} | {
|
|
146
146
|
type: "CLOSE";
|
|
147
|
-
}, Record<string,
|
|
147
|
+
}, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
|
|
148
148
|
type: "START";
|
|
149
149
|
} | {
|
|
150
150
|
type: "CAPTURE";
|
|
@@ -156,7 +156,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
156
156
|
type: "RETRY";
|
|
157
157
|
} | {
|
|
158
158
|
type: "CLOSE";
|
|
159
|
-
},
|
|
159
|
+
}, xstate0.AnyEventObject>;
|
|
160
160
|
}) => {
|
|
161
161
|
config: DocumentUploadConfig;
|
|
162
162
|
stream: undefined;
|
|
@@ -226,7 +226,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
226
226
|
} | {
|
|
227
227
|
type: "CLOSE";
|
|
228
228
|
};
|
|
229
|
-
self:
|
|
229
|
+
self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
|
|
230
230
|
type: "START";
|
|
231
231
|
} | {
|
|
232
232
|
type: "CAPTURE";
|
|
@@ -238,7 +238,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
238
238
|
type: "RETRY";
|
|
239
239
|
} | {
|
|
240
240
|
type: "CLOSE";
|
|
241
|
-
}, Record<string,
|
|
241
|
+
}, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
|
|
242
242
|
type: "START";
|
|
243
243
|
} | {
|
|
244
244
|
type: "CAPTURE";
|
|
@@ -250,7 +250,7 @@ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContex
|
|
|
250
250
|
type: "RETRY";
|
|
251
251
|
} | {
|
|
252
252
|
type: "CLOSE";
|
|
253
|
-
},
|
|
253
|
+
}, xstate0.AnyEventObject>;
|
|
254
254
|
}) => {
|
|
255
255
|
imageBase64: string;
|
|
256
256
|
documentType: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./platform-B3nGssGZ.esm.js";
|
|
2
2
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
3
|
-
import { C as fromPromise, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-
|
|
4
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
+
import { C as fromPromise, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-B-qS9P9T.esm.js";
|
|
4
|
+
import { t as endpoints } from "./endpoints-DEXxYYFi.esm.js";
|
|
5
5
|
import { i as stopCameraStream } from "./camera-D-MPXRbZ.esm.js";
|
|
6
6
|
import { t as getBackCameraStream } from "./backCameraStream-BJwEXNl4.esm.js";
|
|
7
7
|
|
package/dist/ekyb.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./browserSimulation-zWJAZ1vA.esm.js";
|
|
2
2
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
3
|
-
import { C as fromPromise, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-
|
|
4
|
-
import { t as endpoints } from "./endpoints-
|
|
5
|
-
import "./session-
|
|
3
|
+
import { C as fromPromise, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-B-qS9P9T.esm.js";
|
|
4
|
+
import { t as endpoints } from "./endpoints-DEXxYYFi.esm.js";
|
|
5
|
+
import "./session-CIxnj9Wm.esm.js";
|
|
6
6
|
import "./BrowserEnvironmentProvider-DApG6lNu.esm.js";
|
|
7
7
|
import "./BrowserTimerProvider-CRhCvln7.esm.js";
|
|
8
|
-
import { a as POSTAL_CODE_FORMAT_ERROR_KEYS, c as getPostalCodeMaxLength, i as FIXED_DIGIT_POSTAL_CODE_LENGTH, l as validatePostalCode, n as fillFromSuggestion, o as formatPostalCode, r as DYNAMIC_REQUIRED_KEY, s as getPostalCodeErrorKey, t as debounceSearchActor, u as usStateOptions } from "./addressSearch-
|
|
9
|
-
import { t as getFlow } from "./flowServices-
|
|
8
|
+
import { a as POSTAL_CODE_FORMAT_ERROR_KEYS, c as getPostalCodeMaxLength, i as FIXED_DIGIT_POSTAL_CODE_LENGTH, l as validatePostalCode, n as fillFromSuggestion, o as formatPostalCode, r as DYNAMIC_REQUIRED_KEY, s as getPostalCodeErrorKey, t as debounceSearchActor, u as usStateOptions } from "./addressSearch-CmmLAvRi.esm.js";
|
|
9
|
+
import { t as getFlow } from "./flowServices-GUqxIdRY.esm.js";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/ekyb/ekybConstants.ts
|
|
12
12
|
const UBO_INPUT_LIMIT = 8;
|
package/dist/ekyc.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
2
|
-
import { C as fromPromise, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
2
|
+
import { C as fromPromise, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-B-qS9P9T.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-DEXxYYFi.esm.js";
|
|
4
4
|
import "./BrowserTimerProvider-CRhCvln7.esm.js";
|
|
5
|
-
import { a as POSTAL_CODE_FORMAT_ERROR_KEYS, c as getPostalCodeMaxLength, i as FIXED_DIGIT_POSTAL_CODE_LENGTH, l as validatePostalCode, n as fillFromSuggestion, o as formatPostalCode, r as DYNAMIC_REQUIRED_KEY, s as getPostalCodeErrorKey, t as debounceSearchActor, u as usStateOptions } from "./addressSearch-
|
|
5
|
+
import { a as POSTAL_CODE_FORMAT_ERROR_KEYS, c as getPostalCodeMaxLength, i as FIXED_DIGIT_POSTAL_CODE_LENGTH, l as validatePostalCode, n as fillFromSuggestion, o as formatPostalCode, r as DYNAMIC_REQUIRED_KEY, s as getPostalCodeErrorKey, t as debounceSearchActor, u as usStateOptions } from "./addressSearch-CmmLAvRi.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/ekyc/ekycConsts.ts
|
|
8
8
|
const COUNTRY_SELECTOR_DISABLED_SOURCES = ["UK_VOTER_REGISTER"];
|
package/dist/email.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./api-3fZO5bmj.esm.js";
|
|
2
|
-
import "./Manager-
|
|
3
|
-
import "./endpoints-
|
|
2
|
+
import "./Manager-B-qS9P9T.esm.js";
|
|
3
|
+
import "./endpoints-DEXxYYFi.esm.js";
|
|
4
4
|
import "./BrowserTimerProvider-CRhCvln7.esm.js";
|
|
5
|
-
import { r as emailMachine, t as createEmailManager } from "./emailManager-
|
|
5
|
+
import { r as emailMachine, t as createEmailManager } from "./emailManager-E3Cr6KIG.esm.js";
|
|
6
6
|
|
|
7
7
|
export { createEmailManager, emailMachine };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
2
|
-
import { C as fromPromise, S as fromCallback, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
2
|
+
import { C as fromPromise, S as fromCallback, b as setup, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, w as createActor, x as assign } from "./Manager-B-qS9P9T.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-DEXxYYFi.esm.js";
|
|
4
4
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CRhCvln7.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/email/emailServices.ts
|
|
@@ -51,6 +51,7 @@ const endpoints = {
|
|
|
51
51
|
addDocument: "/omni/add/document/v2",
|
|
52
52
|
addressStatement: "/omni/add/address-statement/v2",
|
|
53
53
|
documentV3: "/omni/add/document/v3",
|
|
54
|
+
finalizeDocument: "/omni/finalize/document",
|
|
54
55
|
documentLegacy: "/omni/add/document",
|
|
55
56
|
cfdi: "/omni/process/cfdi",
|
|
56
57
|
finishStatus: "/omni/finish-status",
|