@incodetech/core 0.0.0-dev-20260402-682edb5 → 0.0.0-dev-20260402-7cf9db4
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/Actor-phIcsUhv.d.ts +2 -0
- package/dist/BaseWasmProvider-BFXU7jj8.esm.js +1536 -0
- package/dist/BrowserEnvironmentProvider-DApG6lNu.esm.js +89 -0
- package/dist/BrowserTimerProvider-CRhCvln7.esm.js +22 -0
- package/dist/Manager-BndLda4_.d.ts +19 -0
- package/dist/{events-Cc1xUUgF.esm.js → Manager-D_DMzMWz.esm.js} +114 -11
- package/dist/{warmup-CzfSiaMj.d.ts → StateMachine-CGAi8x_b.d.ts} +4 -1
- package/dist/StreamCanvasCapture-9VAzOfOv.esm.js +410 -0
- package/dist/WasmUtilProvider-DctESPCy.esm.js +114 -0
- package/dist/{addressSearch-DzOdaNEA.esm.js → addressSearch-CYGzuJJ3.esm.js} +3 -3
- package/dist/authentication.d.ts +9 -7
- package/dist/authentication.esm.js +12 -10
- package/dist/{authenticationManager-TaI12wf3.d.ts → authenticationManager-B5Yv9bDw.d.ts} +2 -2
- package/dist/{authenticationManager-CBSPCdJc.esm.js → authenticationManager-C9iQ1d2a.esm.js} +5 -5
- package/dist/{backCameraStream-BGAbuvw1.esm.js → backCameraStream-BJwEXNl4.esm.js} +2 -1
- package/dist/camera-D-MPXRbZ.esm.js +22 -0
- package/dist/camera-Dv2WEhGe.d.ts +4 -0
- package/dist/consent.d.ts +55 -54
- package/dist/consent.esm.js +2 -3
- package/dist/curp-validation.d.ts +5 -3
- package/dist/curp-validation.esm.js +2 -3
- package/dist/deepsightLoader-D2MKmB5z.esm.js +48 -0
- package/dist/{deepsightService-DxA--87N.d.ts → deepsightService-CWnhwXLw.d.ts} +223 -17
- package/dist/document-capture.d.ts +58 -56
- package/dist/document-capture.esm.js +5 -4
- package/dist/document-upload.d.ts +47 -45
- package/dist/document-upload.esm.js +5 -4
- package/dist/ekyb.d.ts +3 -2
- package/dist/ekyb.esm.js +8 -7
- package/dist/ekyc.d.ts +3 -2
- package/dist/ekyc.esm.js +133 -123
- package/dist/email.d.ts +3 -2
- package/dist/email.esm.js +4 -4
- package/dist/{emailManager-DN_q_zxy.d.ts → emailManager-BIq6pJa8.d.ts} +11 -4
- package/dist/{emailManager-DSR9gQLX.esm.js → emailManager-C5GCSw78.esm.js} +43 -23
- package/dist/extensibility.d.ts +45 -43
- package/dist/extensibility.esm.js +26 -15
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -3
- package/dist/{faceCaptureManagerFactory-CGpkO_S3.d.ts → faceCaptureManagerFactory-CN5-GRxP.d.ts} +89 -142
- package/dist/{faceCaptureSetup-Rr7LUbBm.esm.js → faceCaptureSetup-DYRykM5Y.esm.js} +413 -7
- package/dist/flow.d.ts +6 -5
- package/dist/flow.esm.js +7 -7
- package/dist/{flowCompletionService-Bkaerugt.esm.js → flowCompletionService-CBvXiMKa.esm.js} +1 -1
- package/dist/{flowServices-Bt6lMLUI.esm.js → flowServices-CQ3rTJLE.esm.js} +2 -2
- package/dist/geolocation.d.ts +2 -1
- package/dist/geolocation.esm.js +16 -3
- package/dist/government-validation.d.ts +2 -1
- package/dist/government-validation.esm.js +3 -3
- package/dist/id.d.ts +9 -6
- package/dist/id.esm.js +14 -11
- package/dist/{idCaptureManager-Dc2NJMy_.d.ts → idCaptureManager-B1RWflj0.d.ts} +15 -12
- package/dist/{idCaptureManager-QyM4nIKM.esm.js → idCaptureManager-D5rjCu9r.esm.js} +178 -8
- package/dist/index.d.ts +68 -21
- package/dist/index.esm.js +440 -11
- package/dist/mandatory-consent.d.ts +58 -56
- package/dist/mandatory-consent.esm.js +2 -3
- package/dist/phone.d.ts +3 -2
- package/dist/phone.esm.js +4 -4
- package/dist/{phoneManager-D2A0hXXq.d.ts → phoneManager-Ba66ysK2.d.ts} +9 -2
- package/dist/{phoneManager-D2nZtu-b.esm.js → phoneManager-CQJim-Ky.esm.js} +32 -21
- package/dist/platform-B3nGssGZ.esm.js +83 -0
- package/dist/redirect-to-mobile.d.ts +2 -1
- package/dist/redirect-to-mobile.esm.js +3 -3
- package/dist/selfie.d.ts +9 -7
- package/dist/selfie.esm.js +12 -10
- package/dist/{selfieManager-B4Nnp7ws.d.ts → selfieManager-BnfnTPcx.d.ts} +2 -2
- package/dist/{selfieManager-CvE35L72.esm.js → selfieManager-DYW1C2GP.esm.js} +4 -3
- package/dist/session-TBPhHmyy.esm.js +3130 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +2 -2
- package/dist/signature.d.ts +3 -3
- package/dist/signature.esm.js +3 -4
- package/dist/{stats-D0m3TvIg.esm.js → stats-D4C7iDy1.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-oveF7RrS.d.ts → types-BWGxcjiZ.d.ts} +1 -1
- package/dist/{types-mQLzH6uw.d.ts → types-BX1ZlbSR.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/deepsightLoader-B93Oa9pS.esm.js +0 -24
- package/dist/deepsightService-CLUMQ5ee.esm.js +0 -235
- package/dist/index-BTaLQSj9.d.ts +0 -219
- package/dist/recordingsRepository-Djt_In2b.esm.js +0 -122
- package/dist/session-CUy9-Yzi.esm.js +0 -250
- package/dist/src-8rn6DoH7.esm.js +0 -6554
- /package/dist/{api-G4JA8CXK.esm.js → api-3fZO5bmj.esm.js} +0 -0
- /package/dist/{browserSimulation-C8gNnn5p.esm.js → browserSimulation-zWJAZ1vA.esm.js} +0 -0
- /package/dist/{displayErrors-BgtBHbfb.d.ts → displayErrors-DzzB3fcR.d.ts} +0 -0
- /package/dist/{flowCompletionService-De8JDo87.d.ts → flowCompletionService-C_CShl_d.d.ts} +0 -0
- /package/dist/{id-B30uqGbp.esm.js → id-Dv0it9CY.esm.js} +0 -0
- /package/dist/{index-LKrIp3Oo.d.ts → index-CuY8tqBC.d.ts} +0 -0
- /package/dist/{lib-qeMam2F_.esm.js → lib-B5byelWf.esm.js} +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "./Actor-phIcsUhv.js";
|
|
2
|
+
import "./camera-Dv2WEhGe.js";
|
|
3
|
+
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-BWGxcjiZ.js";
|
|
4
|
+
import { t as Manager } from "./Manager-BndLda4_.js";
|
|
5
|
+
import * as xstate140 from "xstate";
|
|
4
6
|
|
|
5
7
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
6
|
-
declare const documentUploadMachine:
|
|
8
|
+
declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContext, {
|
|
7
9
|
type: "START";
|
|
8
10
|
} | {
|
|
9
11
|
type: "CAPTURE";
|
|
@@ -16,52 +18,52 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
16
18
|
} | {
|
|
17
19
|
type: "CLOSE";
|
|
18
20
|
}, {
|
|
19
|
-
[x: string]:
|
|
21
|
+
[x: string]: xstate140.ActorRefFromLogic<xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>> | xstate140.ActorRefFromLogic<xstate140.PromiseActorLogic<void, {
|
|
20
22
|
imageBase64: string;
|
|
21
23
|
documentType: string;
|
|
22
24
|
onProgress: (progress: number) => void;
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
+
}, xstate140.EventObject>> | undefined;
|
|
26
|
+
}, xstate140.Values<{
|
|
25
27
|
initCamera: {
|
|
26
28
|
src: "initCamera";
|
|
27
|
-
logic:
|
|
29
|
+
logic: xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>;
|
|
28
30
|
id: string | undefined;
|
|
29
31
|
};
|
|
30
32
|
uploadDocument: {
|
|
31
33
|
src: "uploadDocument";
|
|
32
|
-
logic:
|
|
34
|
+
logic: xstate140.PromiseActorLogic<void, {
|
|
33
35
|
imageBase64: string;
|
|
34
36
|
documentType: string;
|
|
35
37
|
onProgress: (progress: number) => void;
|
|
36
|
-
},
|
|
38
|
+
}, xstate140.EventObject>;
|
|
37
39
|
id: string | undefined;
|
|
38
40
|
};
|
|
39
|
-
}>,
|
|
41
|
+
}>, xstate140.Values<{
|
|
40
42
|
setError: {
|
|
41
43
|
type: "setError";
|
|
42
|
-
params:
|
|
44
|
+
params: xstate140.NonReducibleUnknown;
|
|
43
45
|
};
|
|
44
46
|
clearError: {
|
|
45
47
|
type: "clearError";
|
|
46
|
-
params:
|
|
48
|
+
params: xstate140.NonReducibleUnknown;
|
|
47
49
|
};
|
|
48
50
|
setStream: {
|
|
49
51
|
type: "setStream";
|
|
50
|
-
params:
|
|
51
|
-
};
|
|
52
|
-
setImageAndClearError: {
|
|
53
|
-
type: "setImageAndClearError";
|
|
54
|
-
params: xstate67.NonReducibleUnknown;
|
|
52
|
+
params: xstate140.NonReducibleUnknown;
|
|
55
53
|
};
|
|
56
54
|
setProgress: {
|
|
57
55
|
type: "setProgress";
|
|
58
|
-
params:
|
|
56
|
+
params: xstate140.NonReducibleUnknown;
|
|
59
57
|
};
|
|
60
58
|
stopStream: {
|
|
61
59
|
type: "stopStream";
|
|
62
|
-
params:
|
|
60
|
+
params: xstate140.NonReducibleUnknown;
|
|
61
|
+
};
|
|
62
|
+
setImageAndClearError: {
|
|
63
|
+
type: "setImageAndClearError";
|
|
64
|
+
params: xstate140.NonReducibleUnknown;
|
|
63
65
|
};
|
|
64
|
-
}>, never, never, "error" | "idle" | "
|
|
66
|
+
}>, never, never, "error" | "idle" | "finished" | "initCamera" | "capturing" | "closed" | "uploading", string, DocumentUploadInput, xstate140.NonReducibleUnknown, xstate140.EventObject, xstate140.MetaObject, {
|
|
65
67
|
readonly id: "documentUpload";
|
|
66
68
|
readonly initial: "idle";
|
|
67
69
|
readonly context: ({
|
|
@@ -70,67 +72,67 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
70
72
|
spawn: {
|
|
71
73
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
72
74
|
src: "initCamera";
|
|
73
|
-
logic:
|
|
75
|
+
logic: xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>;
|
|
74
76
|
id: string | undefined;
|
|
75
77
|
} extends infer T ? T extends {
|
|
76
78
|
src: "initCamera";
|
|
77
|
-
logic:
|
|
79
|
+
logic: xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>;
|
|
78
80
|
id: string | undefined;
|
|
79
81
|
} ? T extends {
|
|
80
82
|
src: TSrc;
|
|
81
|
-
} ?
|
|
83
|
+
} ? xstate140.ConditionalRequired<[options?: ({
|
|
82
84
|
id?: T["id"] | undefined;
|
|
83
85
|
systemId?: string;
|
|
84
|
-
input?:
|
|
86
|
+
input?: xstate140.InputFrom<T["logic"]> | undefined;
|
|
85
87
|
syncSnapshot?: boolean;
|
|
86
|
-
} & { [K in
|
|
88
|
+
} & { [K in xstate140.RequiredActorOptions<T>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
87
89
|
src: "uploadDocument";
|
|
88
|
-
logic:
|
|
90
|
+
logic: xstate140.PromiseActorLogic<void, {
|
|
89
91
|
imageBase64: string;
|
|
90
92
|
documentType: string;
|
|
91
93
|
onProgress: (progress: number) => void;
|
|
92
|
-
},
|
|
94
|
+
}, xstate140.EventObject>;
|
|
93
95
|
id: string | undefined;
|
|
94
96
|
} extends infer T_1 ? T_1 extends {
|
|
95
97
|
src: "uploadDocument";
|
|
96
|
-
logic:
|
|
98
|
+
logic: xstate140.PromiseActorLogic<void, {
|
|
97
99
|
imageBase64: string;
|
|
98
100
|
documentType: string;
|
|
99
101
|
onProgress: (progress: number) => void;
|
|
100
|
-
},
|
|
102
|
+
}, xstate140.EventObject>;
|
|
101
103
|
id: string | undefined;
|
|
102
104
|
} ? T_1 extends {
|
|
103
105
|
src: TSrc;
|
|
104
|
-
} ?
|
|
106
|
+
} ? xstate140.ConditionalRequired<[options?: ({
|
|
105
107
|
id?: T_1["id"] | undefined;
|
|
106
108
|
systemId?: string;
|
|
107
|
-
input?:
|
|
109
|
+
input?: xstate140.InputFrom<T_1["logic"]> | undefined;
|
|
108
110
|
syncSnapshot?: boolean;
|
|
109
|
-
} & { [K_1 in
|
|
111
|
+
} & { [K_1 in xstate140.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredActorOptions<T_1>>> : never : never : never)): xstate140.ActorRefFromLogic<xstate140.GetConcreteByKey<xstate140.Values<{
|
|
110
112
|
initCamera: {
|
|
111
113
|
src: "initCamera";
|
|
112
|
-
logic:
|
|
114
|
+
logic: xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>;
|
|
113
115
|
id: string | undefined;
|
|
114
116
|
};
|
|
115
117
|
uploadDocument: {
|
|
116
118
|
src: "uploadDocument";
|
|
117
|
-
logic:
|
|
119
|
+
logic: xstate140.PromiseActorLogic<void, {
|
|
118
120
|
imageBase64: string;
|
|
119
121
|
documentType: string;
|
|
120
122
|
onProgress: (progress: number) => void;
|
|
121
|
-
},
|
|
123
|
+
}, xstate140.EventObject>;
|
|
122
124
|
id: string | undefined;
|
|
123
125
|
};
|
|
124
126
|
}>, "src", TSrc>["logic"]>;
|
|
125
|
-
<TLogic extends
|
|
127
|
+
<TLogic extends xstate140.AnyActorLogic>(src: TLogic, ...[options]: xstate140.ConditionalRequired<[options?: ({
|
|
126
128
|
id?: never;
|
|
127
129
|
systemId?: string;
|
|
128
|
-
input?:
|
|
130
|
+
input?: xstate140.InputFrom<TLogic> | undefined;
|
|
129
131
|
syncSnapshot?: boolean;
|
|
130
|
-
} & { [K in
|
|
132
|
+
} & { [K in xstate140.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredLogicInput<TLogic>>>): xstate140.ActorRefFromLogic<TLogic>;
|
|
131
133
|
};
|
|
132
134
|
input: DocumentUploadInput;
|
|
133
|
-
self:
|
|
135
|
+
self: xstate140.ActorRef<xstate140.MachineSnapshot<DocumentUploadContext, {
|
|
134
136
|
type: "START";
|
|
135
137
|
} | {
|
|
136
138
|
type: "CAPTURE";
|
|
@@ -142,7 +144,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
142
144
|
type: "RETRY";
|
|
143
145
|
} | {
|
|
144
146
|
type: "CLOSE";
|
|
145
|
-
}, Record<string,
|
|
147
|
+
}, Record<string, xstate140.AnyActorRef | undefined>, xstate140.StateValue, string, unknown, any, any>, {
|
|
146
148
|
type: "START";
|
|
147
149
|
} | {
|
|
148
150
|
type: "CAPTURE";
|
|
@@ -154,7 +156,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
154
156
|
type: "RETRY";
|
|
155
157
|
} | {
|
|
156
158
|
type: "CLOSE";
|
|
157
|
-
},
|
|
159
|
+
}, xstate140.AnyEventObject>;
|
|
158
160
|
}) => {
|
|
159
161
|
config: DocumentUploadConfig;
|
|
160
162
|
stream: undefined;
|
|
@@ -224,7 +226,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
224
226
|
} | {
|
|
225
227
|
type: "CLOSE";
|
|
226
228
|
};
|
|
227
|
-
self:
|
|
229
|
+
self: xstate140.ActorRef<xstate140.MachineSnapshot<DocumentUploadContext, {
|
|
228
230
|
type: "START";
|
|
229
231
|
} | {
|
|
230
232
|
type: "CAPTURE";
|
|
@@ -236,7 +238,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
236
238
|
type: "RETRY";
|
|
237
239
|
} | {
|
|
238
240
|
type: "CLOSE";
|
|
239
|
-
}, Record<string,
|
|
241
|
+
}, Record<string, xstate140.AnyActorRef>, xstate140.StateValue, string, unknown, any, any>, {
|
|
240
242
|
type: "START";
|
|
241
243
|
} | {
|
|
242
244
|
type: "CAPTURE";
|
|
@@ -248,7 +250,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
248
250
|
type: "RETRY";
|
|
249
251
|
} | {
|
|
250
252
|
type: "CLOSE";
|
|
251
|
-
},
|
|
253
|
+
}, xstate140.AnyEventObject>;
|
|
252
254
|
}) => {
|
|
253
255
|
imageBase64: string;
|
|
254
256
|
documentType: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import { t as api } from "./api-G4JA8CXK.esm.js";
|
|
1
|
+
import "./platform-B3nGssGZ.esm.js";
|
|
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-D_DMzMWz.esm.js";
|
|
5
4
|
import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
|
|
5
|
+
import { i as stopCameraStream } from "./camera-D-MPXRbZ.esm.js";
|
|
6
|
+
import { t as getBackCameraStream } from "./backCameraStream-BJwEXNl4.esm.js";
|
|
6
7
|
|
|
7
8
|
//#region src/modules/document-upload/documentUploadServices.ts
|
|
8
9
|
async function uploadDocument({ imageBase64, documentType, onProgress, signal }) {
|
package/dist/ekyb.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "./Actor-phIcsUhv.js";
|
|
2
|
+
import { t as Manager } from "./Manager-BndLda4_.js";
|
|
3
|
+
import { n as AddressSuggestion, r as FieldDef, t as DisplayErrorsResult } from "./displayErrors-DzzB3fcR.js";
|
|
3
4
|
|
|
4
5
|
//#region src/modules/ekyb/types.d.ts
|
|
5
6
|
type UboEntry = {
|
package/dist/ekyb.esm.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import { t as api } from "./api-G4JA8CXK.esm.js";
|
|
1
|
+
import "./browserSimulation-zWJAZ1vA.esm.js";
|
|
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-D_DMzMWz.esm.js";
|
|
5
4
|
import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
|
|
6
|
-
import "./session-
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import "./session-TBPhHmyy.esm.js";
|
|
6
|
+
import "./BrowserEnvironmentProvider-DApG6lNu.esm.js";
|
|
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-CYGzuJJ3.esm.js";
|
|
9
|
+
import { t as getFlow } from "./flowServices-CQ3rTJLE.esm.js";
|
|
9
10
|
|
|
10
11
|
//#region src/modules/ekyb/ekybConstants.ts
|
|
11
12
|
const UBO_INPUT_LIMIT = 8;
|
package/dist/ekyc.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "./Actor-phIcsUhv.js";
|
|
2
|
+
import { t as Manager } from "./Manager-BndLda4_.js";
|
|
3
|
+
import { n as AddressSuggestion, r as FieldDef, t as DisplayErrorsResult } from "./displayErrors-DzzB3fcR.js";
|
|
3
4
|
|
|
4
5
|
//#region src/modules/ekyc/types.d.ts
|
|
5
6
|
type EkycFieldSource = 'user_input' | 'document_scan' | 'poa_document' | 'phone_module_input' | 'email_module_input' | false;
|
package/dist/ekyc.esm.js
CHANGED
|
@@ -1,9 +1,119 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as api } from "./api-G4JA8CXK.esm.js";
|
|
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-D_DMzMWz.esm.js";
|
|
4
3
|
import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
|
|
5
|
-
import
|
|
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-CYGzuJJ3.esm.js";
|
|
6
6
|
|
|
7
|
+
//#region src/modules/ekyc/ekycConsts.ts
|
|
8
|
+
const COUNTRY_SELECTOR_DISABLED_SOURCES = ["UK_VOTER_REGISTER"];
|
|
9
|
+
const STATE_CODE_HINTS = {
|
|
10
|
+
US: "CA, NY",
|
|
11
|
+
CA: "ON, QC",
|
|
12
|
+
BR: "RJ, SP",
|
|
13
|
+
MX: "JAL, NLE",
|
|
14
|
+
GB: "ENG, SCT",
|
|
15
|
+
ES: "MD, CT",
|
|
16
|
+
AR: "B, C, K"
|
|
17
|
+
};
|
|
18
|
+
const ADDRESS_FIELDS = [
|
|
19
|
+
"address",
|
|
20
|
+
"houseNo",
|
|
21
|
+
"street",
|
|
22
|
+
"address2",
|
|
23
|
+
"city",
|
|
24
|
+
"state",
|
|
25
|
+
"postalCode"
|
|
26
|
+
];
|
|
27
|
+
const DRIVERS_LICENSE_FIELDS = [
|
|
28
|
+
"dlNumber",
|
|
29
|
+
"dlState",
|
|
30
|
+
"dlExpireAt"
|
|
31
|
+
];
|
|
32
|
+
const REQUIRED_ERROR_KEYS = new Set(["verification.errors.required"]);
|
|
33
|
+
const INVALID_CPF_PATTERNS = [
|
|
34
|
+
"00000000000",
|
|
35
|
+
"11111111111",
|
|
36
|
+
"22222222222",
|
|
37
|
+
"33333333333",
|
|
38
|
+
"44444444444",
|
|
39
|
+
"55555555555",
|
|
40
|
+
"66666666666",
|
|
41
|
+
"77777777777",
|
|
42
|
+
"88888888888",
|
|
43
|
+
"99999999999"
|
|
44
|
+
];
|
|
45
|
+
const NO_STATE_SOURCES = ["GR_1", "UK_VOTER_REGISTER"];
|
|
46
|
+
const DOB_OPTIONAL_SOURCES = ["US_TELCO_1", "UK_VOTER_REGISTER"];
|
|
47
|
+
const ADDRESS_OPTIONAL_SOURCES = ["US_TELCO_1", "UK_VOTER_REGISTER"];
|
|
48
|
+
const LAST4SSN_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
49
|
+
const DRIVERS_LICENSE_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
50
|
+
const EMAIL_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
51
|
+
const PHONE_OPTIONAL_SOURCES = ["CA_RES_CREDIT", "UK_VOTER_REGISTER"];
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/modules/ekyc/ekycUtils.ts
|
|
55
|
+
function mapToEKYCvalue(field) {
|
|
56
|
+
switch (field) {
|
|
57
|
+
case "poa": return "poa_document";
|
|
58
|
+
case "document": return "document_scan";
|
|
59
|
+
case "phoneModuleInput": return "phone_module_input";
|
|
60
|
+
case "emailModuleInput": return "email_module_input";
|
|
61
|
+
default: return "user_input";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** Maps raw backend module config to a field-source mapping */
|
|
65
|
+
function getEKYCFields(config) {
|
|
66
|
+
return {
|
|
67
|
+
name: config.checkName ? mapToEKYCvalue(config.nameSource ?? "") : false,
|
|
68
|
+
SSN: config.checkSsn ? mapToEKYCvalue(config.ssnSource ?? "") : false,
|
|
69
|
+
address: config.checkAddress ? mapToEKYCvalue(config.addressSource ?? "") : false,
|
|
70
|
+
"date of birth": config.checkDob ? mapToEKYCvalue(config.dobSource ?? "") : false,
|
|
71
|
+
email: config.checkEmail ? mapToEKYCvalue(config.emailSource ?? "") : false,
|
|
72
|
+
phone: config.checkPhone ? mapToEKYCvalue(config.phoneSource ?? "") : false,
|
|
73
|
+
nationality: config.checkNationality ? mapToEKYCvalue(config.nationalitySource ?? "") : false,
|
|
74
|
+
dlNumber: config.checkDlNumber ? mapToEKYCvalue(config.dlNumberSource ?? "") : false,
|
|
75
|
+
dlState: config.checkDlState ? mapToEKYCvalue(config.dlStateSource ?? "") : false,
|
|
76
|
+
dlExpireAt: config.checkDlExpireAt ? mapToEKYCvalue(config.dlExpireAtSource ?? "") : false,
|
|
77
|
+
last4SSN: config.checkLast4SSN ? mapToEKYCvalue(config.last4SSNSource ?? "") : false,
|
|
78
|
+
idNum: config.checkIdNum ? mapToEKYCvalue(config.idNumSource ?? "") : false,
|
|
79
|
+
idNum1: config.checkIdNum1 ? mapToEKYCvalue(config.idNum1Source ?? "") : false,
|
|
80
|
+
gender: config.checkGender ? mapToEKYCvalue(config.genderSource ?? "") : false,
|
|
81
|
+
panNumber: config.checkPanNumber ? mapToEKYCvalue(config.panNumberSource ?? "") : false
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/** Maps a verification source string to a country code */
|
|
85
|
+
function getEKYCCountry(source) {
|
|
86
|
+
switch (source) {
|
|
87
|
+
case "BR_GOVT_1": return "BR";
|
|
88
|
+
case "MX_CONSUMER_1": return "MX";
|
|
89
|
+
case "UK_CREDIT_BUREAU_1":
|
|
90
|
+
case "UK_VOTER_REGISTER": return "GB";
|
|
91
|
+
case "ES_1": return "ES";
|
|
92
|
+
case "CL_1": return "CL";
|
|
93
|
+
case "AR_1": return "AR";
|
|
94
|
+
case "GR_1": return "GR";
|
|
95
|
+
case "GT_1": return "GT";
|
|
96
|
+
case "CO_1": return "CO";
|
|
97
|
+
case "CR_1": return "CR";
|
|
98
|
+
case "CA_RES_CREDIT": return "CA";
|
|
99
|
+
case "INDIA_PAN": return "IN";
|
|
100
|
+
default: return "US";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/** Determines if a field is optional given the current config source */
|
|
104
|
+
function isFieldOptional(fieldName, configSource) {
|
|
105
|
+
if (fieldName === "middleName") return true;
|
|
106
|
+
if (fieldName === "dateOfBirth") return DOB_OPTIONAL_SOURCES.includes(configSource);
|
|
107
|
+
if (fieldName === "street") return false;
|
|
108
|
+
if (ADDRESS_FIELDS.includes(fieldName)) return ADDRESS_OPTIONAL_SOURCES.includes(configSource);
|
|
109
|
+
if (fieldName === "last4SSN") return LAST4SSN_OPTIONAL_SOURCES.includes(configSource);
|
|
110
|
+
if (DRIVERS_LICENSE_FIELDS.includes(fieldName)) return DRIVERS_LICENSE_OPTIONAL_SOURCES.includes(configSource);
|
|
111
|
+
if (fieldName === "email") return EMAIL_OPTIONAL_SOURCES.includes(configSource);
|
|
112
|
+
if (fieldName === "phone") return PHONE_OPTIONAL_SOURCES.includes(configSource);
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
7
117
|
//#region ../../node_modules/.pnpm/libphonenumber-js@1.12.31/node_modules/libphonenumber-js/metadata.min.json.js
|
|
8
118
|
var metadata_min_json_default = {
|
|
9
119
|
"version": 4,
|
|
@@ -9784,117 +9894,28 @@ function isValidPhoneNumber() {
|
|
|
9784
9894
|
}
|
|
9785
9895
|
|
|
9786
9896
|
//#endregion
|
|
9787
|
-
//#region src/
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
AR: "B, C, K"
|
|
9797
|
-
};
|
|
9798
|
-
const ADDRESS_FIELDS = [
|
|
9799
|
-
"address",
|
|
9800
|
-
"houseNo",
|
|
9801
|
-
"street",
|
|
9802
|
-
"address2",
|
|
9803
|
-
"city",
|
|
9804
|
-
"state",
|
|
9805
|
-
"postalCode"
|
|
9806
|
-
];
|
|
9807
|
-
const DRIVERS_LICENSE_FIELDS = [
|
|
9808
|
-
"dlNumber",
|
|
9809
|
-
"dlState",
|
|
9810
|
-
"dlExpireAt"
|
|
9811
|
-
];
|
|
9812
|
-
const REQUIRED_ERROR_KEYS = new Set(["verification.errors.required"]);
|
|
9813
|
-
const INVALID_CPF_PATTERNS = [
|
|
9814
|
-
"00000000000",
|
|
9815
|
-
"11111111111",
|
|
9816
|
-
"22222222222",
|
|
9817
|
-
"33333333333",
|
|
9818
|
-
"44444444444",
|
|
9819
|
-
"55555555555",
|
|
9820
|
-
"66666666666",
|
|
9821
|
-
"77777777777",
|
|
9822
|
-
"88888888888",
|
|
9823
|
-
"99999999999"
|
|
9824
|
-
];
|
|
9825
|
-
const NO_STATE_SOURCES = ["GR_1", "UK_VOTER_REGISTER"];
|
|
9826
|
-
const DOB_OPTIONAL_SOURCES = ["US_TELCO_1", "UK_VOTER_REGISTER"];
|
|
9827
|
-
const ADDRESS_OPTIONAL_SOURCES = ["US_TELCO_1", "UK_VOTER_REGISTER"];
|
|
9828
|
-
const LAST4SSN_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
9829
|
-
const DRIVERS_LICENSE_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
9830
|
-
const EMAIL_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
9831
|
-
const PHONE_OPTIONAL_SOURCES = ["CA_RES_CREDIT", "UK_VOTER_REGISTER"];
|
|
9832
|
-
|
|
9833
|
-
//#endregion
|
|
9834
|
-
//#region src/modules/ekyc/ekycUtils.ts
|
|
9835
|
-
function mapToEKYCvalue(field) {
|
|
9836
|
-
switch (field) {
|
|
9837
|
-
case "poa": return "poa_document";
|
|
9838
|
-
case "document": return "document_scan";
|
|
9839
|
-
case "phoneModuleInput": return "phone_module_input";
|
|
9840
|
-
case "emailModuleInput": return "email_module_input";
|
|
9841
|
-
default: return "user_input";
|
|
9897
|
+
//#region ../infra/src/providers/browser/PhoneValidationProvider.ts
|
|
9898
|
+
var PhoneValidationProvider = class {
|
|
9899
|
+
isValid(phone, country) {
|
|
9900
|
+
if (!phone) return false;
|
|
9901
|
+
try {
|
|
9902
|
+
return isValidPhoneNumber(phone, country);
|
|
9903
|
+
} catch {
|
|
9904
|
+
return phone.replace(/\D/g, "").length >= 7;
|
|
9905
|
+
}
|
|
9842
9906
|
}
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
address: config.checkAddress ? mapToEKYCvalue(config.addressSource ?? "") : false,
|
|
9850
|
-
"date of birth": config.checkDob ? mapToEKYCvalue(config.dobSource ?? "") : false,
|
|
9851
|
-
email: config.checkEmail ? mapToEKYCvalue(config.emailSource ?? "") : false,
|
|
9852
|
-
phone: config.checkPhone ? mapToEKYCvalue(config.phoneSource ?? "") : false,
|
|
9853
|
-
nationality: config.checkNationality ? mapToEKYCvalue(config.nationalitySource ?? "") : false,
|
|
9854
|
-
dlNumber: config.checkDlNumber ? mapToEKYCvalue(config.dlNumberSource ?? "") : false,
|
|
9855
|
-
dlState: config.checkDlState ? mapToEKYCvalue(config.dlStateSource ?? "") : false,
|
|
9856
|
-
dlExpireAt: config.checkDlExpireAt ? mapToEKYCvalue(config.dlExpireAtSource ?? "") : false,
|
|
9857
|
-
last4SSN: config.checkLast4SSN ? mapToEKYCvalue(config.last4SSNSource ?? "") : false,
|
|
9858
|
-
idNum: config.checkIdNum ? mapToEKYCvalue(config.idNumSource ?? "") : false,
|
|
9859
|
-
idNum1: config.checkIdNum1 ? mapToEKYCvalue(config.idNum1Source ?? "") : false,
|
|
9860
|
-
gender: config.checkGender ? mapToEKYCvalue(config.genderSource ?? "") : false,
|
|
9861
|
-
panNumber: config.checkPanNumber ? mapToEKYCvalue(config.panNumberSource ?? "") : false
|
|
9862
|
-
};
|
|
9863
|
-
}
|
|
9864
|
-
/** Maps a verification source string to a country code */
|
|
9865
|
-
function getEKYCCountry(source) {
|
|
9866
|
-
switch (source) {
|
|
9867
|
-
case "BR_GOVT_1": return "BR";
|
|
9868
|
-
case "MX_CONSUMER_1": return "MX";
|
|
9869
|
-
case "UK_CREDIT_BUREAU_1":
|
|
9870
|
-
case "UK_VOTER_REGISTER": return "GB";
|
|
9871
|
-
case "ES_1": return "ES";
|
|
9872
|
-
case "CL_1": return "CL";
|
|
9873
|
-
case "AR_1": return "AR";
|
|
9874
|
-
case "GR_1": return "GR";
|
|
9875
|
-
case "GT_1": return "GT";
|
|
9876
|
-
case "CO_1": return "CO";
|
|
9877
|
-
case "CR_1": return "CR";
|
|
9878
|
-
case "CA_RES_CREDIT": return "CA";
|
|
9879
|
-
case "INDIA_PAN": return "IN";
|
|
9880
|
-
default: return "US";
|
|
9907
|
+
formatE164(phone, country) {
|
|
9908
|
+
try {
|
|
9909
|
+
const parsed = parsePhoneNumber(phone, country);
|
|
9910
|
+
if (parsed?.isValid()) return parsed.format("E.164");
|
|
9911
|
+
} catch {}
|
|
9912
|
+
return null;
|
|
9881
9913
|
}
|
|
9882
|
-
}
|
|
9883
|
-
/** Determines if a field is optional given the current config source */
|
|
9884
|
-
function isFieldOptional(fieldName, configSource) {
|
|
9885
|
-
if (fieldName === "middleName") return true;
|
|
9886
|
-
if (fieldName === "dateOfBirth") return DOB_OPTIONAL_SOURCES.includes(configSource);
|
|
9887
|
-
if (fieldName === "street") return false;
|
|
9888
|
-
if (ADDRESS_FIELDS.includes(fieldName)) return ADDRESS_OPTIONAL_SOURCES.includes(configSource);
|
|
9889
|
-
if (fieldName === "last4SSN") return LAST4SSN_OPTIONAL_SOURCES.includes(configSource);
|
|
9890
|
-
if (DRIVERS_LICENSE_FIELDS.includes(fieldName)) return DRIVERS_LICENSE_OPTIONAL_SOURCES.includes(configSource);
|
|
9891
|
-
if (fieldName === "email") return EMAIL_OPTIONAL_SOURCES.includes(configSource);
|
|
9892
|
-
if (fieldName === "phone") return PHONE_OPTIONAL_SOURCES.includes(configSource);
|
|
9893
|
-
return false;
|
|
9894
|
-
}
|
|
9914
|
+
};
|
|
9895
9915
|
|
|
9896
9916
|
//#endregion
|
|
9897
9917
|
//#region src/modules/ekyc/ekycValidators.ts
|
|
9918
|
+
const phoneValidator = new PhoneValidationProvider();
|
|
9898
9919
|
/**
|
|
9899
9920
|
* Validates a Brazilian CPF number (11-digit checksum).
|
|
9900
9921
|
* Accepts formatted (000.000.000-00) or unformatted input.
|
|
@@ -9936,22 +9957,11 @@ const PO_BOX_REGEX = /POBox|P\.O\.Box|pobox|postofficebox|postbox|po\.box|p\.o\.
|
|
|
9936
9957
|
function isPoBox(address) {
|
|
9937
9958
|
return PO_BOX_REGEX.test(address.replace(/\s/g, ""));
|
|
9938
9959
|
}
|
|
9939
|
-
/** Validates a phone number using libphonenumber-js country rules */
|
|
9940
9960
|
function validatePhone(phone, country) {
|
|
9941
|
-
|
|
9942
|
-
try {
|
|
9943
|
-
return isValidPhoneNumber(phone, country);
|
|
9944
|
-
} catch {
|
|
9945
|
-
return phone.replace(/\D/g, "").length >= 7;
|
|
9946
|
-
}
|
|
9961
|
+
return phoneValidator.isValid(phone, country);
|
|
9947
9962
|
}
|
|
9948
|
-
/** Formats a phone number to E.164 for API submission */
|
|
9949
9963
|
function formatPhoneE164(phone, country) {
|
|
9950
|
-
|
|
9951
|
-
const parsed = parsePhoneNumber(phone, country);
|
|
9952
|
-
if (parsed?.isValid()) return parsed.format("E.164");
|
|
9953
|
-
} catch {}
|
|
9954
|
-
return phone;
|
|
9964
|
+
return phoneValidator.formatE164(phone, country) ?? phone;
|
|
9955
9965
|
}
|
|
9956
9966
|
|
|
9957
9967
|
//#endregion
|
package/dist/email.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
1
|
+
import "./Actor-phIcsUhv.js";
|
|
2
|
+
import "./Manager-BndLda4_.js";
|
|
3
|
+
import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-BIq6pJa8.js";
|
|
3
4
|
export { type EmailConfig, type EmailManager, type EmailState, createEmailManager, emailMachine };
|
package/dist/email.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./api-G4JA8CXK.esm.js";
|
|
1
|
+
import "./api-3fZO5bmj.esm.js";
|
|
2
|
+
import "./Manager-D_DMzMWz.esm.js";
|
|
4
3
|
import "./endpoints-CCuj1KZH.esm.js";
|
|
5
|
-
import
|
|
4
|
+
import "./BrowserTimerProvider-CRhCvln7.esm.js";
|
|
5
|
+
import { r as emailMachine, t as createEmailManager } from "./emailManager-C5GCSw78.esm.js";
|
|
6
6
|
|
|
7
7
|
export { createEmailManager, emailMachine };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as ActorRefFrom } from "./Actor-phIcsUhv.js";
|
|
2
|
+
import { t as Manager } from "./Manager-BndLda4_.js";
|
|
2
3
|
|
|
3
4
|
//#region src/modules/email/types.d.ts
|
|
4
5
|
|
|
@@ -104,9 +105,15 @@ type EmailAwaitingOtpState = {
|
|
|
104
105
|
canResend: boolean;
|
|
105
106
|
attemptsRemaining: number;
|
|
106
107
|
};
|
|
107
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* OTP code is being verified against the backend
|
|
110
|
+
* @property resendTimer - Seconds remaining on resend cooldown (unchanged while verifying)
|
|
111
|
+
* @property canResend - Whether resend is allowed (cooldown finished)
|
|
112
|
+
*/
|
|
108
113
|
type EmailVerifyingOtpState = {
|
|
109
114
|
status: 'verifyingOtp';
|
|
115
|
+
resendTimer: number;
|
|
116
|
+
canResend: boolean;
|
|
110
117
|
};
|
|
111
118
|
/**
|
|
112
119
|
* OTP verification failed - user can retry with `submitOtp()`
|
|
@@ -213,7 +220,7 @@ declare function createEmailManager(options: CreateEmailActorOptions): Manager<E
|
|
|
213
220
|
/**
|
|
214
221
|
* Submits the email address for verification.
|
|
215
222
|
* Requires a valid email address to be set via `setEmail()`.
|
|
216
|
-
* Transitions to 'submitting', then to '
|
|
223
|
+
* Transitions to 'submitting', then to 'sendingInitialOtp' or 'success' (if no OTP).
|
|
217
224
|
*/
|
|
218
225
|
submit(): void;
|
|
219
226
|
/**
|
|
@@ -281,7 +288,7 @@ declare function createEmailManagerFromActor(actor: EmailActor): Manager<EmailSt
|
|
|
281
288
|
/**
|
|
282
289
|
* Submits the email address for verification.
|
|
283
290
|
* Requires a valid email address to be set via `setEmail()`.
|
|
284
|
-
* Transitions to 'submitting', then to '
|
|
291
|
+
* Transitions to 'submitting', then to 'sendingInitialOtp' or 'success' (if no OTP).
|
|
285
292
|
*/
|
|
286
293
|
submit(): void;
|
|
287
294
|
/**
|