@incodetech/core 0.0.0-dev-20260403-eccc51c → 0.0.0-dev-20260407-4580f1c
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/{addressSearch-DC5By0cC.esm.js → addressSearch-B8Fo4v9V.esm.js} +11 -4
- package/dist/consent.d.ts +50 -50
- package/dist/document-capture.d.ts +70 -70
- package/dist/document-upload.d.ts +46 -46
- package/dist/ekyb.esm.js +5 -4
- package/dist/ekyc.esm.js +100 -18
- package/dist/extensibility.esm.js +2 -9
- package/dist/flow.esm.js +2 -2
- package/dist/{flowServices-CO2sIR3D.esm.js → flowServices-D5ugKT5n.esm.js} +1 -1
- package/dist/id.esm.js +2 -2
- package/dist/{idCaptureManager-DaLU1ug7.esm.js → idCaptureManager-DUZxcSP_.esm.js} +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +53 -53
- package/dist/{session-OglUYC9l.esm.js → session-DqNrvO4r.esm.js} +8 -1
- package/package.json +2 -2
|
@@ -2,10 +2,10 @@ import "./Actor-By8WNHi-.js";
|
|
|
2
2
|
import "./camera-6XJdOeBF.js";
|
|
3
3
|
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-CiLyvJGb.js";
|
|
4
4
|
import { t as Manager } from "./Manager-CCT_-HuZ.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as xstate96 from "xstate";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
8
|
-
declare const documentUploadMachine:
|
|
8
|
+
declare const documentUploadMachine: xstate96.StateMachine<DocumentUploadContext, {
|
|
9
9
|
type: "START";
|
|
10
10
|
} | {
|
|
11
11
|
type: "CAPTURE";
|
|
@@ -18,52 +18,52 @@ declare const documentUploadMachine: xstate445.StateMachine<DocumentUploadContex
|
|
|
18
18
|
} | {
|
|
19
19
|
type: "CLOSE";
|
|
20
20
|
}, {
|
|
21
|
-
[x: string]:
|
|
21
|
+
[x: string]: xstate96.ActorRefFromLogic<xstate96.PromiseActorLogic<MediaStream, void, xstate96.EventObject>> | xstate96.ActorRefFromLogic<xstate96.PromiseActorLogic<void, {
|
|
22
22
|
imageBase64: string;
|
|
23
23
|
documentType: string;
|
|
24
24
|
onProgress: (progress: number) => void;
|
|
25
|
-
},
|
|
26
|
-
},
|
|
25
|
+
}, xstate96.EventObject>> | undefined;
|
|
26
|
+
}, xstate96.Values<{
|
|
27
27
|
initCamera: {
|
|
28
28
|
src: "initCamera";
|
|
29
|
-
logic:
|
|
29
|
+
logic: xstate96.PromiseActorLogic<MediaStream, void, xstate96.EventObject>;
|
|
30
30
|
id: string | undefined;
|
|
31
31
|
};
|
|
32
32
|
uploadDocument: {
|
|
33
33
|
src: "uploadDocument";
|
|
34
|
-
logic:
|
|
34
|
+
logic: xstate96.PromiseActorLogic<void, {
|
|
35
35
|
imageBase64: string;
|
|
36
36
|
documentType: string;
|
|
37
37
|
onProgress: (progress: number) => void;
|
|
38
|
-
},
|
|
38
|
+
}, xstate96.EventObject>;
|
|
39
39
|
id: string | undefined;
|
|
40
40
|
};
|
|
41
|
-
}>,
|
|
42
|
-
setError: {
|
|
43
|
-
type: "setError";
|
|
44
|
-
params: xstate445.NonReducibleUnknown;
|
|
45
|
-
};
|
|
46
|
-
clearError: {
|
|
47
|
-
type: "clearError";
|
|
48
|
-
params: xstate445.NonReducibleUnknown;
|
|
49
|
-
};
|
|
41
|
+
}>, xstate96.Values<{
|
|
50
42
|
setStream: {
|
|
51
43
|
type: "setStream";
|
|
52
|
-
params:
|
|
44
|
+
params: xstate96.NonReducibleUnknown;
|
|
53
45
|
};
|
|
54
46
|
setProgress: {
|
|
55
47
|
type: "setProgress";
|
|
56
|
-
params:
|
|
48
|
+
params: xstate96.NonReducibleUnknown;
|
|
49
|
+
};
|
|
50
|
+
clearError: {
|
|
51
|
+
type: "clearError";
|
|
52
|
+
params: xstate96.NonReducibleUnknown;
|
|
57
53
|
};
|
|
58
54
|
stopStream: {
|
|
59
55
|
type: "stopStream";
|
|
60
|
-
params:
|
|
56
|
+
params: xstate96.NonReducibleUnknown;
|
|
61
57
|
};
|
|
62
58
|
setImageAndClearError: {
|
|
63
59
|
type: "setImageAndClearError";
|
|
64
|
-
params:
|
|
60
|
+
params: xstate96.NonReducibleUnknown;
|
|
61
|
+
};
|
|
62
|
+
setError: {
|
|
63
|
+
type: "setError";
|
|
64
|
+
params: xstate96.NonReducibleUnknown;
|
|
65
65
|
};
|
|
66
|
-
}>, never, never, "error" | "
|
|
66
|
+
}>, never, never, "error" | "initCamera" | "capturing" | "finished" | "closed" | "uploading" | "idle", string, DocumentUploadInput, xstate96.NonReducibleUnknown, xstate96.EventObject, xstate96.MetaObject, {
|
|
67
67
|
readonly id: "documentUpload";
|
|
68
68
|
readonly initial: "idle";
|
|
69
69
|
readonly context: ({
|
|
@@ -72,67 +72,67 @@ declare const documentUploadMachine: xstate445.StateMachine<DocumentUploadContex
|
|
|
72
72
|
spawn: {
|
|
73
73
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
74
74
|
src: "initCamera";
|
|
75
|
-
logic:
|
|
75
|
+
logic: xstate96.PromiseActorLogic<MediaStream, void, xstate96.EventObject>;
|
|
76
76
|
id: string | undefined;
|
|
77
77
|
} extends infer T ? T extends {
|
|
78
78
|
src: "initCamera";
|
|
79
|
-
logic:
|
|
79
|
+
logic: xstate96.PromiseActorLogic<MediaStream, void, xstate96.EventObject>;
|
|
80
80
|
id: string | undefined;
|
|
81
81
|
} ? T extends {
|
|
82
82
|
src: TSrc;
|
|
83
|
-
} ?
|
|
83
|
+
} ? xstate96.ConditionalRequired<[options?: ({
|
|
84
84
|
id?: T["id"] | undefined;
|
|
85
85
|
systemId?: string;
|
|
86
|
-
input?:
|
|
86
|
+
input?: xstate96.InputFrom<T["logic"]> | undefined;
|
|
87
87
|
syncSnapshot?: boolean;
|
|
88
|
-
} & { [K in
|
|
88
|
+
} & { [K in xstate96.RequiredActorOptions<T>]: unknown }) | undefined], xstate96.IsNotNever<xstate96.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
89
89
|
src: "uploadDocument";
|
|
90
|
-
logic:
|
|
90
|
+
logic: xstate96.PromiseActorLogic<void, {
|
|
91
91
|
imageBase64: string;
|
|
92
92
|
documentType: string;
|
|
93
93
|
onProgress: (progress: number) => void;
|
|
94
|
-
},
|
|
94
|
+
}, xstate96.EventObject>;
|
|
95
95
|
id: string | undefined;
|
|
96
96
|
} extends infer T_1 ? T_1 extends {
|
|
97
97
|
src: "uploadDocument";
|
|
98
|
-
logic:
|
|
98
|
+
logic: xstate96.PromiseActorLogic<void, {
|
|
99
99
|
imageBase64: string;
|
|
100
100
|
documentType: string;
|
|
101
101
|
onProgress: (progress: number) => void;
|
|
102
|
-
},
|
|
102
|
+
}, xstate96.EventObject>;
|
|
103
103
|
id: string | undefined;
|
|
104
104
|
} ? T_1 extends {
|
|
105
105
|
src: TSrc;
|
|
106
|
-
} ?
|
|
106
|
+
} ? xstate96.ConditionalRequired<[options?: ({
|
|
107
107
|
id?: T_1["id"] | undefined;
|
|
108
108
|
systemId?: string;
|
|
109
|
-
input?:
|
|
109
|
+
input?: xstate96.InputFrom<T_1["logic"]> | undefined;
|
|
110
110
|
syncSnapshot?: boolean;
|
|
111
|
-
} & { [K_1 in
|
|
111
|
+
} & { [K_1 in xstate96.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate96.IsNotNever<xstate96.RequiredActorOptions<T_1>>> : never : never : never)): xstate96.ActorRefFromLogic<xstate96.GetConcreteByKey<xstate96.Values<{
|
|
112
112
|
initCamera: {
|
|
113
113
|
src: "initCamera";
|
|
114
|
-
logic:
|
|
114
|
+
logic: xstate96.PromiseActorLogic<MediaStream, void, xstate96.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
};
|
|
117
117
|
uploadDocument: {
|
|
118
118
|
src: "uploadDocument";
|
|
119
|
-
logic:
|
|
119
|
+
logic: xstate96.PromiseActorLogic<void, {
|
|
120
120
|
imageBase64: string;
|
|
121
121
|
documentType: string;
|
|
122
122
|
onProgress: (progress: number) => void;
|
|
123
|
-
},
|
|
123
|
+
}, xstate96.EventObject>;
|
|
124
124
|
id: string | undefined;
|
|
125
125
|
};
|
|
126
126
|
}>, "src", TSrc>["logic"]>;
|
|
127
|
-
<TLogic extends
|
|
127
|
+
<TLogic extends xstate96.AnyActorLogic>(src: TLogic, ...[options]: xstate96.ConditionalRequired<[options?: ({
|
|
128
128
|
id?: never;
|
|
129
129
|
systemId?: string;
|
|
130
|
-
input?:
|
|
130
|
+
input?: xstate96.InputFrom<TLogic> | undefined;
|
|
131
131
|
syncSnapshot?: boolean;
|
|
132
|
-
} & { [K in
|
|
132
|
+
} & { [K in xstate96.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate96.IsNotNever<xstate96.RequiredLogicInput<TLogic>>>): xstate96.ActorRefFromLogic<TLogic>;
|
|
133
133
|
};
|
|
134
134
|
input: DocumentUploadInput;
|
|
135
|
-
self:
|
|
135
|
+
self: xstate96.ActorRef<xstate96.MachineSnapshot<DocumentUploadContext, {
|
|
136
136
|
type: "START";
|
|
137
137
|
} | {
|
|
138
138
|
type: "CAPTURE";
|
|
@@ -144,7 +144,7 @@ declare const documentUploadMachine: xstate445.StateMachine<DocumentUploadContex
|
|
|
144
144
|
type: "RETRY";
|
|
145
145
|
} | {
|
|
146
146
|
type: "CLOSE";
|
|
147
|
-
}, Record<string,
|
|
147
|
+
}, Record<string, xstate96.AnyActorRef | undefined>, xstate96.StateValue, string, unknown, any, any>, {
|
|
148
148
|
type: "START";
|
|
149
149
|
} | {
|
|
150
150
|
type: "CAPTURE";
|
|
@@ -156,7 +156,7 @@ declare const documentUploadMachine: xstate445.StateMachine<DocumentUploadContex
|
|
|
156
156
|
type: "RETRY";
|
|
157
157
|
} | {
|
|
158
158
|
type: "CLOSE";
|
|
159
|
-
},
|
|
159
|
+
}, xstate96.AnyEventObject>;
|
|
160
160
|
}) => {
|
|
161
161
|
config: DocumentUploadConfig;
|
|
162
162
|
stream: undefined;
|
|
@@ -226,7 +226,7 @@ declare const documentUploadMachine: xstate445.StateMachine<DocumentUploadContex
|
|
|
226
226
|
} | {
|
|
227
227
|
type: "CLOSE";
|
|
228
228
|
};
|
|
229
|
-
self:
|
|
229
|
+
self: xstate96.ActorRef<xstate96.MachineSnapshot<DocumentUploadContext, {
|
|
230
230
|
type: "START";
|
|
231
231
|
} | {
|
|
232
232
|
type: "CAPTURE";
|
|
@@ -238,7 +238,7 @@ declare const documentUploadMachine: xstate445.StateMachine<DocumentUploadContex
|
|
|
238
238
|
type: "RETRY";
|
|
239
239
|
} | {
|
|
240
240
|
type: "CLOSE";
|
|
241
|
-
}, Record<string,
|
|
241
|
+
}, Record<string, xstate96.AnyActorRef>, xstate96.StateValue, string, unknown, any, any>, {
|
|
242
242
|
type: "START";
|
|
243
243
|
} | {
|
|
244
244
|
type: "CAPTURE";
|
|
@@ -250,7 +250,7 @@ declare const documentUploadMachine: xstate445.StateMachine<DocumentUploadContex
|
|
|
250
250
|
type: "RETRY";
|
|
251
251
|
} | {
|
|
252
252
|
type: "CLOSE";
|
|
253
|
-
},
|
|
253
|
+
}, xstate96.AnyEventObject>;
|
|
254
254
|
}) => {
|
|
255
255
|
imageBase64: string;
|
|
256
256
|
documentType: string;
|
package/dist/ekyb.esm.js
CHANGED
|
@@ -2,11 +2,11 @@ import "./browserSimulation-DYAk0Ipe.esm.js";
|
|
|
2
2
|
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
3
3
|
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-C6AGXEq_.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
5
|
-
import "./session-
|
|
5
|
+
import "./session-DqNrvO4r.esm.js";
|
|
6
6
|
import "./BrowserEnvironmentProvider-BECjyw3_.esm.js";
|
|
7
7
|
import "./BrowserTimerProvider-CIqH6hJp.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-B8Fo4v9V.esm.js";
|
|
9
|
+
import { t as getFlow } from "./flowServices-D5ugKT5n.esm.js";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/ekyb/ekybConstants.ts
|
|
12
12
|
const UBO_INPUT_LIMIT = 8;
|
|
@@ -511,7 +511,8 @@ const ekybMachine = setup({
|
|
|
511
511
|
markSubmitAttempted: assign({ submitAttempted: () => true }),
|
|
512
512
|
fillAddressFields: assign(({ context, event }) => {
|
|
513
513
|
const { suggestion } = event;
|
|
514
|
-
const
|
|
514
|
+
const activeFields = new Set(context.fields.map((f) => f.name));
|
|
515
|
+
const { values: newValues } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
|
|
515
516
|
const { errors, isValid } = computeEkybValidation(context.fields, newValues, context.country, context.ubos, context.hasUbos);
|
|
516
517
|
return {
|
|
517
518
|
values: newValues,
|
package/dist/ekyc.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
|
2
2
|
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-C6AGXEq_.esm.js";
|
|
3
3
|
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
4
4
|
import "./BrowserTimerProvider-CIqH6hJp.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-B8Fo4v9V.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/ekyc/ekycConsts.ts
|
|
8
8
|
const COUNTRY_SELECTOR_DISABLED_SOURCES = ["UK_VOTER_REGISTER"];
|
|
@@ -42,13 +42,90 @@ const INVALID_CPF_PATTERNS = [
|
|
|
42
42
|
"88888888888",
|
|
43
43
|
"99999999999"
|
|
44
44
|
];
|
|
45
|
-
const NO_STATE_SOURCES = ["GR_1", "UK_VOTER_REGISTER"];
|
|
46
45
|
const DOB_OPTIONAL_SOURCES = ["US_TELCO_1", "UK_VOTER_REGISTER"];
|
|
47
46
|
const ADDRESS_OPTIONAL_SOURCES = ["US_TELCO_1", "UK_VOTER_REGISTER"];
|
|
48
47
|
const LAST4SSN_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
49
48
|
const DRIVERS_LICENSE_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
50
49
|
const EMAIL_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
51
50
|
const PHONE_OPTIONAL_SOURCES = ["CA_RES_CREDIT", "UK_VOTER_REGISTER"];
|
|
51
|
+
const NAME_SOURCES = [
|
|
52
|
+
"US_TELCO_1",
|
|
53
|
+
"US_TELCO_2",
|
|
54
|
+
"US_TELCO_4",
|
|
55
|
+
"US_ADDRESS_1",
|
|
56
|
+
"US_CREDIT_BUREAU_1",
|
|
57
|
+
"US_DRIVERS_LICENSE_1",
|
|
58
|
+
"CA_RES_CREDIT",
|
|
59
|
+
"SERPRO",
|
|
60
|
+
"SE_1",
|
|
61
|
+
"GR_1",
|
|
62
|
+
"GT_1",
|
|
63
|
+
"AR_1",
|
|
64
|
+
"ES_1",
|
|
65
|
+
"UK_VOTER_REGISTER",
|
|
66
|
+
"CL_1",
|
|
67
|
+
"INDIA_PAN"
|
|
68
|
+
];
|
|
69
|
+
const HOUSE_NO_SOURCES = [
|
|
70
|
+
"SERPRO",
|
|
71
|
+
"GR_1",
|
|
72
|
+
"ES_1"
|
|
73
|
+
];
|
|
74
|
+
const STREET_SOURCES = [
|
|
75
|
+
"US_TELCO_1",
|
|
76
|
+
"US_TELCO_2",
|
|
77
|
+
"US_CREDIT_BUREAU_1",
|
|
78
|
+
"CA_RES_CREDIT",
|
|
79
|
+
"SERPRO",
|
|
80
|
+
"AR_1",
|
|
81
|
+
"ES_1",
|
|
82
|
+
"UK_VOTER_REGISTER"
|
|
83
|
+
];
|
|
84
|
+
const CITY_SOURCES = [
|
|
85
|
+
"US_TELCO_1",
|
|
86
|
+
"US_TELCO_2",
|
|
87
|
+
"US_CREDIT_BUREAU_1",
|
|
88
|
+
"CA_RES_CREDIT",
|
|
89
|
+
"SERPRO",
|
|
90
|
+
"AR_1",
|
|
91
|
+
"ES_1",
|
|
92
|
+
"UK_VOTER_REGISTER"
|
|
93
|
+
];
|
|
94
|
+
const ADDRESS_STATE_SOURCES = [
|
|
95
|
+
"US_TELCO_1",
|
|
96
|
+
"US_TELCO_2",
|
|
97
|
+
"US_CREDIT_BUREAU_1",
|
|
98
|
+
"US_DRIVERS_LICENSE_1",
|
|
99
|
+
"CA_RES_CREDIT",
|
|
100
|
+
"SERPRO",
|
|
101
|
+
"AR_1",
|
|
102
|
+
"ES_1"
|
|
103
|
+
];
|
|
104
|
+
const POSTAL_CODE_SOURCES = [
|
|
105
|
+
"US_TELCO_1",
|
|
106
|
+
"US_TELCO_2",
|
|
107
|
+
"US_CREDIT_BUREAU_1",
|
|
108
|
+
"CA_RES_CREDIT",
|
|
109
|
+
"SERPRO",
|
|
110
|
+
"AR_1",
|
|
111
|
+
"ES_1",
|
|
112
|
+
"UK_VOTER_REGISTER"
|
|
113
|
+
];
|
|
114
|
+
const TAX_ID_SOURCES = [
|
|
115
|
+
"GT_1",
|
|
116
|
+
"ES_1",
|
|
117
|
+
"CL_1"
|
|
118
|
+
];
|
|
119
|
+
const MIDDLE_NAME_SOURCES = [
|
|
120
|
+
"US_CREDIT_BUREAU_1",
|
|
121
|
+
"CA_RES_CREDIT",
|
|
122
|
+
"UK_VOTER_REGISTER",
|
|
123
|
+
"GR_1",
|
|
124
|
+
"AR_1",
|
|
125
|
+
"ES_1",
|
|
126
|
+
"CL_1",
|
|
127
|
+
"INDIA_PAN"
|
|
128
|
+
];
|
|
52
129
|
|
|
53
130
|
//#endregion
|
|
54
131
|
//#region src/modules/ekyc/ekycUtils.ts
|
|
@@ -84,7 +161,8 @@ function getEKYCFields(config) {
|
|
|
84
161
|
/** Maps a verification source string to a country code */
|
|
85
162
|
function getEKYCCountry(source) {
|
|
86
163
|
switch (source) {
|
|
87
|
-
case "BR_GOVT_1":
|
|
164
|
+
case "BR_GOVT_1":
|
|
165
|
+
case "SERPRO": return "BR";
|
|
88
166
|
case "MX_CONSUMER_1": return "MX";
|
|
89
167
|
case "UK_CREDIT_BUREAU_1":
|
|
90
168
|
case "UK_VOTER_REGISTER": return "GB";
|
|
@@ -9979,21 +10057,22 @@ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false)
|
|
|
9979
10057
|
...opts
|
|
9980
10058
|
});
|
|
9981
10059
|
};
|
|
9982
|
-
|
|
9983
|
-
|
|
10060
|
+
const nameSource = fields.name || (NAME_SOURCES.includes(configSource) ? "user_input" : false);
|
|
10061
|
+
if (nameSource) {
|
|
10062
|
+
add("firstName", "text", "verification.labels.firstName", nameSource, {
|
|
9984
10063
|
maxLength: 100,
|
|
9985
10064
|
placeholder: "verification.placeholder.firstName"
|
|
9986
10065
|
});
|
|
9987
|
-
if (configSource
|
|
10066
|
+
if (MIDDLE_NAME_SOURCES.includes(configSource)) add("middleName", "text", "verification.labels.middleName", nameSource, {
|
|
9988
10067
|
maxLength: 100,
|
|
9989
10068
|
placeholder: "verification.placeholder.middleName",
|
|
9990
10069
|
optional: true
|
|
9991
10070
|
});
|
|
9992
|
-
add("surName", "text", country === "US" ? "verification.labels.lastName" : "verification.labels.surName",
|
|
10071
|
+
add("surName", "text", country === "US" ? "verification.labels.lastName" : "verification.labels.surName", nameSource, {
|
|
9993
10072
|
maxLength: 100,
|
|
9994
10073
|
placeholder: country === "US" ? "verification.placeholder.lastName" : "verification.placeholder.surname"
|
|
9995
10074
|
});
|
|
9996
|
-
if (country === "MX") add("maternalSurname", "text", "verification.labels.maternalSurname",
|
|
10075
|
+
if (country === "MX") add("maternalSurname", "text", "verification.labels.maternalSurname", nameSource, {
|
|
9997
10076
|
maxLength: 100,
|
|
9998
10077
|
placeholder: "verification.placeholder.maternalSurname"
|
|
9999
10078
|
});
|
|
@@ -10004,7 +10083,7 @@ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false)
|
|
|
10004
10083
|
const phoneCountrySelectorDisabled = enablePhoneRisk && configSource !== "PHONE_RISK_1" || COUNTRY_SELECTOR_DISABLED_SOURCES.includes(configSource);
|
|
10005
10084
|
add("phone", "phone", "verification.labels.phone", fields.phone, { disableCountrySelector: phoneCountrySelectorDisabled });
|
|
10006
10085
|
}
|
|
10007
|
-
if (fields.SSN) if (country === "BR") add("taxId", "text", "verification.labels.taxId", fields.SSN);
|
|
10086
|
+
if (fields.SSN) if (country === "BR" || TAX_ID_SOURCES.includes(configSource)) add("taxId", "text", "verification.labels.taxId", fields.SSN);
|
|
10008
10087
|
else if (country === "CN") add("ssn", "text", "verification.labels.prcId", fields.SSN);
|
|
10009
10088
|
else add("ssn", "text", "verification.labels.ssn", fields.SSN, { maxLength: 11 });
|
|
10010
10089
|
if (fields.nationality) if (country === "BR") add("nationality", "dropdown", "verification.labels.nationality", fields.nationality, { options: [
|
|
@@ -10038,11 +10117,13 @@ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false)
|
|
|
10038
10117
|
}] });
|
|
10039
10118
|
if (fields.panNumber) add("panNumber", "text", "verification.labels.panNumber", fields.panNumber, { maxLength: 10 });
|
|
10040
10119
|
const addAddressFields = () => {
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
add("
|
|
10045
|
-
if (
|
|
10120
|
+
const needsAddress = HOUSE_NO_SOURCES.includes(configSource) || STREET_SOURCES.includes(configSource) || ADDRESS_STATE_SOURCES.includes(configSource);
|
|
10121
|
+
const addrSource = fields.address || (needsAddress ? "user_input" : false);
|
|
10122
|
+
if (!addrSource) return;
|
|
10123
|
+
if (HOUSE_NO_SOURCES.includes(configSource)) add("houseNo", "text", "verification.labels.houseNo", addrSource, { section: "address" });
|
|
10124
|
+
if (STREET_SOURCES.includes(configSource)) add("street", "text", "verification.labels.street", addrSource, { section: "address" });
|
|
10125
|
+
if (CITY_SOURCES.includes(configSource)) add("city", "text", "verification.labels.city", addrSource, { section: "address" });
|
|
10126
|
+
if (ADDRESS_STATE_SOURCES.includes(configSource)) add("state", country === "US" ? "dropdown" : "text", country === "US" ? "verification.labels.chooseState" : "verification.labels.state", addrSource, {
|
|
10046
10127
|
section: "address",
|
|
10047
10128
|
...country === "US" ? {
|
|
10048
10129
|
options: usStateOptions,
|
|
@@ -10052,7 +10133,7 @@ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false)
|
|
|
10052
10133
|
placeholderParams: { states: STATE_CODE_HINTS[country] ?? "" }
|
|
10053
10134
|
}
|
|
10054
10135
|
});
|
|
10055
|
-
add("postalCode", "text", country === "US" ? "verification.labels.zipCode" : "verification.labels.postalCode",
|
|
10136
|
+
if (POSTAL_CODE_SOURCES.includes(configSource)) add("postalCode", "text", country === "US" ? "verification.labels.zipCode" : "verification.labels.postalCode", addrSource, {
|
|
10056
10137
|
section: "address",
|
|
10057
10138
|
maxLength: getPostalCodeMaxLength(country)
|
|
10058
10139
|
});
|
|
@@ -10084,9 +10165,9 @@ function validateField(name, value, required, country, configSource) {
|
|
|
10084
10165
|
if (name === "street" && isPoBox(val)) return "verification.errors.poBox";
|
|
10085
10166
|
if (name === "postalCode") return validatePostalCode(val, country) ? void 0 : getPostalCodeErrorKey(country);
|
|
10086
10167
|
if (name === "phone") {
|
|
10087
|
-
if (!isFieldOptional("phone", configSource) || val) return validatePhone(val, country) ? void 0 : "verification.errors.
|
|
10168
|
+
if (!isFieldOptional("phone", configSource) || val) return validatePhone(val, country) ? void 0 : "verification.errors.phoneInvalid";
|
|
10088
10169
|
}
|
|
10089
|
-
if (name === "email" && val) return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val) ? void 0 : "verification.errors.
|
|
10170
|
+
if (name === "email" && val) return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val) ? void 0 : "verification.errors.emailInvalid";
|
|
10090
10171
|
if (name === "panNumber" && val) return val.length === 10 ? void 0 : "verification.errors.exactly10Characters";
|
|
10091
10172
|
}
|
|
10092
10173
|
function computeValidation(fields, values, country, configSource) {
|
|
@@ -10375,7 +10456,8 @@ const ekycMachine = setup({
|
|
|
10375
10456
|
}),
|
|
10376
10457
|
fillAddressFields: assign(({ context, event }) => {
|
|
10377
10458
|
const { suggestion } = event;
|
|
10378
|
-
const
|
|
10459
|
+
const activeFields = new Set(context.fields.map((f) => f.name));
|
|
10460
|
+
const { values: newValues } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
|
|
10379
10461
|
const { errors, isValid } = computeValidation(context.fields, newValues, context.fieldsCountry, context.configSource);
|
|
10380
10462
|
return {
|
|
10381
10463
|
values: newValues,
|
|
@@ -5,9 +5,9 @@ import "./browserSimulation-DYAk0Ipe.esm.js";
|
|
|
5
5
|
import "./api-C2uzxrpN.esm.js";
|
|
6
6
|
import { C as createActor, S as fromPromise } from "./Manager-C6AGXEq_.esm.js";
|
|
7
7
|
import "./endpoints-CI5-28jT.esm.js";
|
|
8
|
-
import { c as
|
|
8
|
+
import { c as getDeviceFingerprintInfo, s as getFingerprint } from "./session-DqNrvO4r.esm.js";
|
|
9
9
|
import "./BrowserEnvironmentProvider-BECjyw3_.esm.js";
|
|
10
|
-
import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-
|
|
10
|
+
import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-DUZxcSP_.esm.js";
|
|
11
11
|
import "./BrowserTimerProvider-CIqH6hJp.esm.js";
|
|
12
12
|
import "./camera-DAuRUvnp.esm.js";
|
|
13
13
|
import "./stats-BVigf5Rn.esm.js";
|
|
@@ -19,11 +19,4 @@ import { n as createEmailManagerFromActor } from "./emailManager-CpAwvP3v.esm.js
|
|
|
19
19
|
import { n as createSelfieManagerFromActor } from "./selfieManager-BSkzncsa.esm.js";
|
|
20
20
|
import { n as createPhoneManagerFromActor } from "./phoneManager-BAPHSXx8.esm.js";
|
|
21
21
|
|
|
22
|
-
//#region src/internal/fingerprint/fingerprintApi.ts
|
|
23
|
-
async function getFingerprint(disableIpify) {
|
|
24
|
-
const shouldDisableIpify = disableIpify ?? getDisableIpify();
|
|
25
|
-
return new FingerprintProvider(new IpifyProvider()).getFingerprint(shouldDisableIpify);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
22
|
export { BrowserStorageProvider, WasmUtilProvider, createActor, createAuthenticationManagerFromActor, createEmailManagerFromActor, createIdCaptureManagerFromActor, createPhoneManagerFromActor, createSelfieManagerFromActor, faceCaptureMachine, fromPromise, getDeviceFingerprintInfo, getFingerprint };
|
package/dist/flow.esm.js
CHANGED
|
@@ -2,9 +2,9 @@ import "./browserSimulation-DYAk0Ipe.esm.js";
|
|
|
2
2
|
import "./api-C2uzxrpN.esm.js";
|
|
3
3
|
import { C as createActor, S as fromPromise, b as assign, s as createManagerInstrumentation, t as createManager, x as fromCallback, y as setup } from "./Manager-C6AGXEq_.esm.js";
|
|
4
4
|
import "./endpoints-CI5-28jT.esm.js";
|
|
5
|
-
import "./session-
|
|
5
|
+
import "./session-DqNrvO4r.esm.js";
|
|
6
6
|
import "./BrowserEnvironmentProvider-BECjyw3_.esm.js";
|
|
7
|
-
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-
|
|
7
|
+
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-D5ugKT5n.esm.js";
|
|
8
8
|
import { t as getFinishStatus } from "./flowCompletionService-TnWijsSw.esm.js";
|
|
9
9
|
|
|
10
10
|
//#region src/modules/flow/flowStateMachine.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
2
2
|
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
3
|
-
import { i as initializeSession, r as getSessionFingerprintResult } from "./session-
|
|
3
|
+
import { i as initializeSession, r as getSessionFingerprintResult } from "./session-DqNrvO4r.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/flow/flowUtils.ts
|
|
6
6
|
const WASM_MODULE_PIPELINES = {
|
package/dist/id.esm.js
CHANGED
|
@@ -5,9 +5,9 @@ import "./browserSimulation-DYAk0Ipe.esm.js";
|
|
|
5
5
|
import "./api-C2uzxrpN.esm.js";
|
|
6
6
|
import "./Manager-C6AGXEq_.esm.js";
|
|
7
7
|
import "./endpoints-CI5-28jT.esm.js";
|
|
8
|
-
import "./session-
|
|
8
|
+
import "./session-DqNrvO4r.esm.js";
|
|
9
9
|
import "./BrowserEnvironmentProvider-BECjyw3_.esm.js";
|
|
10
|
-
import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-
|
|
10
|
+
import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-DUZxcSP_.esm.js";
|
|
11
11
|
import "./BrowserTimerProvider-CIqH6hJp.esm.js";
|
|
12
12
|
import "./camera-DAuRUvnp.esm.js";
|
|
13
13
|
import "./stats-BVigf5Rn.esm.js";
|
|
@@ -4,7 +4,7 @@ import { c as requestPermission, d as flagIdManualReview, f as BrowserStoragePro
|
|
|
4
4
|
import { r as getToken, t as api } from "./api-C2uzxrpN.esm.js";
|
|
5
5
|
import { C as createActor, S as fromPromise, b as assign, i as eventScreenNames, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, v as revokeObjectURL, x as fromCallback, y as setup } from "./Manager-C6AGXEq_.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
7
|
-
import { t as getDisableIpify } from "./session-
|
|
7
|
+
import { t as getDisableIpify } from "./session-DqNrvO4r.esm.js";
|
|
8
8
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CIqH6hJp.esm.js";
|
|
9
9
|
import { t as addDeviceStats } from "./stats-BVigf5Rn.esm.js";
|
|
10
10
|
import { t as getBackCameraStream } from "./backCameraStream-DF_d7hTz.esm.js";
|
package/dist/index.esm.js
CHANGED
|
@@ -5,9 +5,9 @@ import "./browserSimulation-DYAk0Ipe.esm.js";
|
|
|
5
5
|
import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-C2uzxrpN.esm.js";
|
|
6
6
|
import { _ as subscribeEvent, a as tutorialScreenNamesMapper, c as captureAttemptFinished, d as moduleOpened, f as screenClosed, g as flushEventQueue, h as addEvent, i as eventScreenNames, l as elementClicked, m as screenOpened, n as cameraScreenNamesMapper, o as videoSelfieEvents, p as screenEvent, r as eventModuleNames, u as moduleClosed } from "./Manager-C6AGXEq_.esm.js";
|
|
7
7
|
import "./endpoints-CI5-28jT.esm.js";
|
|
8
|
-
import { a as isSessionInitialized, i as initializeSession, n as getSessionFeatures, o as resetSessionInit, t as getDisableIpify
|
|
8
|
+
import { a as isSessionInitialized, i as initializeSession, l as createSession, n as getSessionFeatures, o as resetSessionInit, t as getDisableIpify } from "./session-DqNrvO4r.esm.js";
|
|
9
9
|
import "./BrowserEnvironmentProvider-BECjyw3_.esm.js";
|
|
10
|
-
import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-
|
|
10
|
+
import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-DUZxcSP_.esm.js";
|
|
11
11
|
import "./BrowserTimerProvider-CIqH6hJp.esm.js";
|
|
12
12
|
import "./camera-DAuRUvnp.esm.js";
|
|
13
13
|
import "./stats-BVigf5Rn.esm.js";
|