@incodetech/core 2.0.0-rc.0 → 2.0.1-rc.0
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/ae-signature.d.ts +1 -1
- package/dist/consent.d.ts +50 -50
- package/dist/cpf-ocr.d.ts +17 -17
- package/dist/document-capture.d.ts +71 -71
- package/dist/document-upload.d.ts +43 -43
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybStateMachine-B59rQjgj.esm.js → ekybStateMachine-BR2let5f.esm.js} +1 -1
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/extensibility.d.ts +1 -1
- package/dist/extensibility.esm.js +3 -3
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +2 -2
- package/dist/{flowServices-DTsm-Vf1.esm.js → flowServices-DG3IdWw6.esm.js} +1 -1
- package/dist/home.d.ts +10 -10
- package/dist/id-ocr.d.ts +52 -52
- package/dist/id-verification.d.ts +25 -25
- package/dist/id.d.ts +1 -1
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-B9TGA5dq.d.ts → idCaptureManager-Fyd0eam-.d.ts} +2 -0
- package/dist/{idCaptureManager-DMK0GIt3.esm.js → idCaptureManager-ZPkD7Gjk.esm.js} +1 -1
- package/dist/{idCaptureStateMachine-Bq0fVZXl.esm.js → idCaptureStateMachine-BK0bPHoc.esm.js} +27 -18
- package/dist/identity-reuse.d.ts +40 -40
- package/dist/{index-BLKtMA0g.d.ts → index-DZoqeAo9.d.ts} +119 -119
- package/dist/index.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +50 -50
- package/dist/qe-signature.d.ts +1 -1
- package/dist/{session-BS-d_vuE.esm.js → session-CGtQJJzB.esm.js} +1 -1
- package/dist/session.esm.js +1 -1
- package/dist/{setup-Buy-hyj4.esm.js → setup-DsM8IG7k.esm.js} +1 -1
- package/dist/wasm.esm.js +2 -2
- package/dist/workflow.d.ts +87 -87
- package/dist/workflow.esm.js +4 -4
- package/package.json +3 -3
package/dist/{idCaptureStateMachine-Bq0fVZXl.esm.js → idCaptureStateMachine-BK0bPHoc.esm.js}
RENAMED
|
@@ -3,7 +3,7 @@ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-DhNc_x02.esm.j
|
|
|
3
3
|
import { r as getToken, t as api } from "./api-CESGtpbH.esm.js";
|
|
4
4
|
import { S as revokeObjectURL } from "./events-D6-e4vok.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
|
|
6
|
-
import { t as getDisableIpify } from "./session-
|
|
6
|
+
import { t as getDisableIpify } from "./session-CGtQJJzB.esm.js";
|
|
7
7
|
import { a as fromPromise, i as fromCallback, n as sendTo, o as and, r as assign, t as setup } from "./xstate.esm-B70JrNqo.esm.js";
|
|
8
8
|
import { n as IncodeCanvas } from "./deepsightService-O74l4Y__.esm.js";
|
|
9
9
|
import { _ as stopRecording$1, a as StreamCanvasCapture, g as startRecording, h as createRecordingSession, i as flagIdManualReview, n as preloadOpenViduProvider, v as StreamCanvasProcessingSession } from "./recordingService-Ig2UgbLv.esm.js";
|
|
@@ -19,11 +19,23 @@ const TERMINAL_FAIL_REASONS = new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED"
|
|
|
19
19
|
function isKnownFailReason(reason) {
|
|
20
20
|
return reason === "DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED" || reason === "ID_TYPE_UNACCEPTABLE" || reason === "FILE_CHANGED_ERROR" || reason === "NETWORK_ERROR" || reason === "GENERIC";
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Maps a digital-upload response to the UI's failure reason, or `null` when
|
|
24
|
+
* the upload is a success.
|
|
25
|
+
*
|
|
26
|
+
* Failure detection is layered so we don't lose backend rejections that V2
|
|
27
|
+
* was previously dropping (V1 parity): explicit `failReason` first, then a
|
|
28
|
+
* "this document isn't accepted" signal (`acceptedDocuments` populated or
|
|
29
|
+
* `classification === false`) which maps to `ID_TYPE_UNACCEPTABLE`, then
|
|
30
|
+
* the bare `success === false` fallback as a generic rejection.
|
|
31
|
+
*/
|
|
22
32
|
function mapDigitalIdFailReason(response) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (isKnownFailReason(failReason)
|
|
26
|
-
return "
|
|
33
|
+
if (!response) return null;
|
|
34
|
+
const { failReason } = response;
|
|
35
|
+
if (typeof failReason === "string" && failReason.length > 0) return isKnownFailReason(failReason) ? failReason : "GENERIC";
|
|
36
|
+
if (response.acceptedDocuments != null && response.acceptedDocuments.length > 0 || response.classification === false) return "ID_TYPE_UNACCEPTABLE";
|
|
37
|
+
if (response.success === false) return "GENERIC";
|
|
38
|
+
return null;
|
|
27
39
|
}
|
|
28
40
|
function isTerminalDigitalIdFailReason(response) {
|
|
29
41
|
return typeof response?.failReason === "string" && TERMINAL_FAIL_REASONS.has(response.failReason);
|
|
@@ -125,10 +137,7 @@ const _digitalUploadMachine = setup({
|
|
|
125
137
|
if (!("error" in event)) return {};
|
|
126
138
|
return { failReason: classifyNetworkError(event.error) };
|
|
127
139
|
}),
|
|
128
|
-
|
|
129
|
-
if (!(context.failReason !== "INVALID_FILE_TYPE" && context.failReason !== null && context.failReason !== "DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED" && context.failReason !== "ID_TYPE_UNACCEPTABLE")) return {};
|
|
130
|
-
return { attemptsRemaining: Math.max(0, context.attemptsRemaining - 1) };
|
|
131
|
-
})
|
|
140
|
+
decrementAttemptOnFailure: assign(({ context }) => ({ attemptsRemaining: Math.max(0, context.attemptsRemaining - 1) }))
|
|
132
141
|
},
|
|
133
142
|
guards: {
|
|
134
143
|
isSelectedFileTooLarge: ({ event }) => event.type === "FILE_PICKED" && event.file.size > DIGITAL_UPLOAD_MAX_FILE_SIZE_BYTES,
|
|
@@ -224,7 +233,11 @@ const _digitalUploadMachine = setup({
|
|
|
224
233
|
{
|
|
225
234
|
guard: "responseHasFailReason",
|
|
226
235
|
target: "checkRetries",
|
|
227
|
-
actions: [
|
|
236
|
+
actions: [
|
|
237
|
+
"storeUploadResponse",
|
|
238
|
+
"setFailReasonFromResponse",
|
|
239
|
+
"decrementAttemptOnFailure"
|
|
240
|
+
]
|
|
228
241
|
},
|
|
229
242
|
{
|
|
230
243
|
target: "success",
|
|
@@ -233,7 +246,7 @@ const _digitalUploadMachine = setup({
|
|
|
233
246
|
],
|
|
234
247
|
onError: {
|
|
235
248
|
target: "checkRetries",
|
|
236
|
-
actions: ["setFailReasonFromNetworkError"]
|
|
249
|
+
actions: ["setFailReasonFromNetworkError", "decrementAttemptOnFailure"]
|
|
237
250
|
}
|
|
238
251
|
},
|
|
239
252
|
initial: "analyzing",
|
|
@@ -257,17 +270,13 @@ const _digitalUploadMachine = setup({
|
|
|
257
270
|
error: { on: {
|
|
258
271
|
RETRY: {
|
|
259
272
|
target: "selecting",
|
|
260
|
-
actions: [
|
|
261
|
-
"decrementAttemptOnRetry",
|
|
262
|
-
"setPendingPickerAutoOpen",
|
|
263
|
-
"clearSelectedFile"
|
|
264
|
-
]
|
|
273
|
+
actions: ["setPendingPickerAutoOpen", "clearSelectedFile"]
|
|
265
274
|
},
|
|
266
275
|
SCAN_INSTEAD: { target: "closed" }
|
|
267
276
|
} },
|
|
268
277
|
retriesExhausted: {
|
|
269
|
-
|
|
270
|
-
|
|
278
|
+
entry: assign({ resultType: "exhausted" }),
|
|
279
|
+
on: { SCAN_INSTEAD: { target: "closed" } }
|
|
271
280
|
},
|
|
272
281
|
closed: {
|
|
273
282
|
type: "final",
|
package/dist/identity-reuse.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-C8PrhBOx.js";
|
|
2
2
|
import { t as ActorRefFrom } from "./Actor-CI32dTbG.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as xstate449 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/identity-reuse/types.d.ts
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ type IdentityReuseContext = {
|
|
|
32
32
|
type IdentityReuseInput = {
|
|
33
33
|
config: IdentityReuseConfig;
|
|
34
34
|
};
|
|
35
|
-
declare const identityReuseMachine:
|
|
35
|
+
declare const identityReuseMachine: xstate449.StateMachine<IdentityReuseContext, {
|
|
36
36
|
type: "LOAD";
|
|
37
37
|
} | {
|
|
38
38
|
type: "START_SELECTION";
|
|
@@ -48,49 +48,49 @@ declare const identityReuseMachine: xstate826.StateMachine<IdentityReuseContext,
|
|
|
48
48
|
} | {
|
|
49
49
|
type: "RETRY";
|
|
50
50
|
}, {
|
|
51
|
-
[x: string]:
|
|
52
|
-
},
|
|
51
|
+
[x: string]: xstate449.ActorRefFromLogic<xstate449.PromiseActorLogic<FetchCandidatesResponse, void, xstate449.EventObject>> | xstate449.ActorRefFromLogic<xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>> | undefined;
|
|
52
|
+
}, xstate449.Values<{
|
|
53
53
|
fetchCandidates: {
|
|
54
54
|
src: "fetchCandidates";
|
|
55
|
-
logic:
|
|
55
|
+
logic: xstate449.PromiseActorLogic<FetchCandidatesResponse, void, xstate449.EventObject>;
|
|
56
56
|
id: string | undefined;
|
|
57
57
|
};
|
|
58
58
|
submitContinue: {
|
|
59
59
|
src: "submitContinue";
|
|
60
|
-
logic:
|
|
60
|
+
logic: xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>;
|
|
61
61
|
id: string | undefined;
|
|
62
62
|
};
|
|
63
63
|
submitSkip: {
|
|
64
64
|
src: "submitSkip";
|
|
65
|
-
logic:
|
|
65
|
+
logic: xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>;
|
|
66
66
|
id: string | undefined;
|
|
67
67
|
};
|
|
68
|
-
}>,
|
|
68
|
+
}>, xstate449.Values<{
|
|
69
69
|
setError: {
|
|
70
70
|
type: "setError";
|
|
71
|
-
params:
|
|
71
|
+
params: xstate449.NonReducibleUnknown;
|
|
72
72
|
};
|
|
73
73
|
clearError: {
|
|
74
74
|
type: "clearError";
|
|
75
|
-
params:
|
|
75
|
+
params: xstate449.NonReducibleUnknown;
|
|
76
76
|
};
|
|
77
77
|
setCandidates: {
|
|
78
78
|
type: "setCandidates";
|
|
79
|
-
params:
|
|
79
|
+
params: xstate449.NonReducibleUnknown;
|
|
80
80
|
};
|
|
81
81
|
setSelectedCandidate: {
|
|
82
82
|
type: "setSelectedCandidate";
|
|
83
|
-
params:
|
|
83
|
+
params: xstate449.NonReducibleUnknown;
|
|
84
84
|
};
|
|
85
85
|
autoSelectSingleCandidate: {
|
|
86
86
|
type: "autoSelectSingleCandidate";
|
|
87
|
-
params:
|
|
87
|
+
params: xstate449.NonReducibleUnknown;
|
|
88
88
|
};
|
|
89
89
|
clearSelection: {
|
|
90
90
|
type: "clearSelection";
|
|
91
|
-
params:
|
|
91
|
+
params: xstate449.NonReducibleUnknown;
|
|
92
92
|
};
|
|
93
|
-
}>,
|
|
93
|
+
}>, xstate449.Values<{
|
|
94
94
|
hasMultipleCandidates: {
|
|
95
95
|
type: "hasMultipleCandidates";
|
|
96
96
|
params: unknown;
|
|
@@ -105,7 +105,7 @@ declare const identityReuseMachine: xstate826.StateMachine<IdentityReuseContext,
|
|
|
105
105
|
};
|
|
106
106
|
}>, never, "error" | "idle" | "finished" | "loading" | "submitContinue" | "submitSkip" | "oneCandidateFound" | "noCandidatesFound" | {
|
|
107
107
|
multiCandidatesFound: "noCandidateSelected" | "choosingCandidate" | "candidateSelected";
|
|
108
|
-
}, string, IdentityReuseInput,
|
|
108
|
+
}, string, IdentityReuseInput, xstate449.NonReducibleUnknown, xstate449.EventObject, xstate449.MetaObject, {
|
|
109
109
|
readonly id: "identityReuse";
|
|
110
110
|
readonly initial: "idle";
|
|
111
111
|
readonly context: ({
|
|
@@ -114,75 +114,75 @@ declare const identityReuseMachine: xstate826.StateMachine<IdentityReuseContext,
|
|
|
114
114
|
spawn: {
|
|
115
115
|
<TSrc extends "fetchCandidates" | "submitContinue" | "submitSkip">(logic: TSrc, ...[options]: ({
|
|
116
116
|
src: "fetchCandidates";
|
|
117
|
-
logic:
|
|
117
|
+
logic: xstate449.PromiseActorLogic<FetchCandidatesResponse, void, xstate449.EventObject>;
|
|
118
118
|
id: string | undefined;
|
|
119
119
|
} extends infer T ? T extends {
|
|
120
120
|
src: "fetchCandidates";
|
|
121
|
-
logic:
|
|
121
|
+
logic: xstate449.PromiseActorLogic<FetchCandidatesResponse, void, xstate449.EventObject>;
|
|
122
122
|
id: string | undefined;
|
|
123
123
|
} ? T extends {
|
|
124
124
|
src: TSrc;
|
|
125
|
-
} ?
|
|
125
|
+
} ? xstate449.ConditionalRequired<[options?: ({
|
|
126
126
|
id?: T["id"] | undefined;
|
|
127
127
|
systemId?: string;
|
|
128
|
-
input?:
|
|
128
|
+
input?: xstate449.InputFrom<T["logic"]> | undefined;
|
|
129
129
|
syncSnapshot?: boolean;
|
|
130
|
-
} & { [K in
|
|
130
|
+
} & { [K in xstate449.RequiredActorOptions<T>]: unknown }) | undefined], xstate449.IsNotNever<xstate449.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
131
131
|
src: "submitContinue";
|
|
132
|
-
logic:
|
|
132
|
+
logic: xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>;
|
|
133
133
|
id: string | undefined;
|
|
134
134
|
} extends infer T_1 ? T_1 extends {
|
|
135
135
|
src: "submitContinue";
|
|
136
|
-
logic:
|
|
136
|
+
logic: xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>;
|
|
137
137
|
id: string | undefined;
|
|
138
138
|
} ? T_1 extends {
|
|
139
139
|
src: TSrc;
|
|
140
|
-
} ?
|
|
140
|
+
} ? xstate449.ConditionalRequired<[options?: ({
|
|
141
141
|
id?: T_1["id"] | undefined;
|
|
142
142
|
systemId?: string;
|
|
143
|
-
input?:
|
|
143
|
+
input?: xstate449.InputFrom<T_1["logic"]> | undefined;
|
|
144
144
|
syncSnapshot?: boolean;
|
|
145
|
-
} & { [K_1 in
|
|
145
|
+
} & { [K_1 in xstate449.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate449.IsNotNever<xstate449.RequiredActorOptions<T_1>>> : never : never : never) | ({
|
|
146
146
|
src: "submitSkip";
|
|
147
|
-
logic:
|
|
147
|
+
logic: xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>;
|
|
148
148
|
id: string | undefined;
|
|
149
149
|
} extends infer T_2 ? T_2 extends {
|
|
150
150
|
src: "submitSkip";
|
|
151
|
-
logic:
|
|
151
|
+
logic: xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>;
|
|
152
152
|
id: string | undefined;
|
|
153
153
|
} ? T_2 extends {
|
|
154
154
|
src: TSrc;
|
|
155
|
-
} ?
|
|
155
|
+
} ? xstate449.ConditionalRequired<[options?: ({
|
|
156
156
|
id?: T_2["id"] | undefined;
|
|
157
157
|
systemId?: string;
|
|
158
|
-
input?:
|
|
158
|
+
input?: xstate449.InputFrom<T_2["logic"]> | undefined;
|
|
159
159
|
syncSnapshot?: boolean;
|
|
160
|
-
} & { [K_2 in
|
|
160
|
+
} & { [K_2 in xstate449.RequiredActorOptions<T_2>]: unknown }) | undefined], xstate449.IsNotNever<xstate449.RequiredActorOptions<T_2>>> : never : never : never)): xstate449.ActorRefFromLogic<xstate449.GetConcreteByKey<xstate449.Values<{
|
|
161
161
|
fetchCandidates: {
|
|
162
162
|
src: "fetchCandidates";
|
|
163
|
-
logic:
|
|
163
|
+
logic: xstate449.PromiseActorLogic<FetchCandidatesResponse, void, xstate449.EventObject>;
|
|
164
164
|
id: string | undefined;
|
|
165
165
|
};
|
|
166
166
|
submitContinue: {
|
|
167
167
|
src: "submitContinue";
|
|
168
|
-
logic:
|
|
168
|
+
logic: xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>;
|
|
169
169
|
id: string | undefined;
|
|
170
170
|
};
|
|
171
171
|
submitSkip: {
|
|
172
172
|
src: "submitSkip";
|
|
173
|
-
logic:
|
|
173
|
+
logic: xstate449.PromiseActorLogic<SubmitResponse, void, xstate449.EventObject>;
|
|
174
174
|
id: string | undefined;
|
|
175
175
|
};
|
|
176
176
|
}>, "src", TSrc>["logic"]>;
|
|
177
|
-
<TLogic extends
|
|
177
|
+
<TLogic extends xstate449.AnyActorLogic>(src: TLogic, ...[options]: xstate449.ConditionalRequired<[options?: ({
|
|
178
178
|
id?: never;
|
|
179
179
|
systemId?: string;
|
|
180
|
-
input?:
|
|
180
|
+
input?: xstate449.InputFrom<TLogic> | undefined;
|
|
181
181
|
syncSnapshot?: boolean;
|
|
182
|
-
} & { [K in
|
|
182
|
+
} & { [K in xstate449.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate449.IsNotNever<xstate449.RequiredLogicInput<TLogic>>>): xstate449.ActorRefFromLogic<TLogic>;
|
|
183
183
|
};
|
|
184
184
|
input: IdentityReuseInput;
|
|
185
|
-
self:
|
|
185
|
+
self: xstate449.ActorRef<xstate449.MachineSnapshot<IdentityReuseContext, {
|
|
186
186
|
type: "LOAD";
|
|
187
187
|
} | {
|
|
188
188
|
type: "START_SELECTION";
|
|
@@ -197,7 +197,7 @@ declare const identityReuseMachine: xstate826.StateMachine<IdentityReuseContext,
|
|
|
197
197
|
type: "SKIP";
|
|
198
198
|
} | {
|
|
199
199
|
type: "RETRY";
|
|
200
|
-
}, Record<string,
|
|
200
|
+
}, Record<string, xstate449.AnyActorRef | undefined>, xstate449.StateValue, string, unknown, any, any>, {
|
|
201
201
|
type: "LOAD";
|
|
202
202
|
} | {
|
|
203
203
|
type: "START_SELECTION";
|
|
@@ -212,7 +212,7 @@ declare const identityReuseMachine: xstate826.StateMachine<IdentityReuseContext,
|
|
|
212
212
|
type: "SKIP";
|
|
213
213
|
} | {
|
|
214
214
|
type: "RETRY";
|
|
215
|
-
},
|
|
215
|
+
}, xstate449.AnyEventObject>;
|
|
216
216
|
}) => {
|
|
217
217
|
config: IdentityReuseConfig;
|
|
218
218
|
currentOrganizationName: undefined;
|