@incodetech/core 0.0.0-dev-20260325-9772cd2 → 0.0.0-dev-20260325-72e1e24
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/authentication.d.ts +2 -2
- package/dist/authentication.esm.js +3 -3
- package/dist/{authenticationManager-CRC59Vms.esm.js → authenticationManager-CoeHnXPS.esm.js} +1 -1
- package/dist/{authenticationManager-DbKSx46Q.d.ts → authenticationManager-TaI12wf3.d.ts} +1 -1
- package/dist/{backCameraStream-DtcVhHEz.esm.js → backCameraStream-jiRgi6k7.esm.js} +103 -17
- package/dist/consent.d.ts +50 -50
- package/dist/document-capture.d.ts +52 -52
- package/dist/document-capture.esm.js +1 -1
- package/dist/document-upload.d.ts +46 -46
- package/dist/document-upload.esm.js +1 -1
- package/dist/extensibility.d.ts +3 -3
- package/dist/extensibility.esm.js +5 -5
- package/dist/{faceCaptureManagerFactory-MPKxiFCQ.d.ts → faceCaptureManagerFactory-CGpkO_S3.d.ts} +5 -0
- package/dist/{faceCaptureSetup-4itNYIdX.esm.js → faceCaptureSetup-CP7WXoGS.esm.js} +27 -8
- package/dist/id.esm.js +2 -2
- package/dist/{idCaptureManager-Bl-CBtgX.esm.js → idCaptureManager-BxlkQJq-.esm.js} +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +53 -53
- package/dist/selfie.d.ts +2 -2
- package/dist/selfie.esm.js +3 -3
- package/dist/{selfieManager-qS-A0pXo.d.ts → selfieManager-B4Nnp7ws.d.ts} +1 -1
- package/dist/{selfieManager-UcQu7POO.esm.js → selfieManager-DZTwDE-b.esm.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as CameraStream, f as Manager } from "./index-BTaLQSj9.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as xstate131 from "xstate";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/document-capture/types.d.ts
|
|
5
5
|
type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
|
|
@@ -71,7 +71,7 @@ type DocumentCaptureInput = {
|
|
|
71
71
|
};
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/modules/document-capture/documentCaptureStateMachine.d.ts
|
|
74
|
-
declare const documentCaptureMachine:
|
|
74
|
+
declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureContext, {
|
|
75
75
|
type: "CAPTURE";
|
|
76
76
|
} | {
|
|
77
77
|
type: "FILE_SELECTED";
|
|
@@ -94,84 +94,84 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
|
|
|
94
94
|
} | {
|
|
95
95
|
type: "CLOSE";
|
|
96
96
|
}, {
|
|
97
|
-
[x: string]:
|
|
97
|
+
[x: string]: xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>> | xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<DocumentUploadResponse, {
|
|
98
98
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
99
99
|
processingType: string;
|
|
100
100
|
onProgress: (progress: number) => void;
|
|
101
|
-
},
|
|
102
|
-
},
|
|
101
|
+
}, xstate131.EventObject>> | undefined;
|
|
102
|
+
}, xstate131.Values<{
|
|
103
103
|
initCamera: {
|
|
104
104
|
src: "initCamera";
|
|
105
|
-
logic:
|
|
105
|
+
logic: xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>;
|
|
106
106
|
id: string | undefined;
|
|
107
107
|
};
|
|
108
108
|
uploadDocument: {
|
|
109
109
|
src: "uploadDocument";
|
|
110
|
-
logic:
|
|
110
|
+
logic: xstate131.PromiseActorLogic<DocumentUploadResponse, {
|
|
111
111
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
112
112
|
processingType: string;
|
|
113
113
|
onProgress: (progress: number) => void;
|
|
114
|
-
},
|
|
114
|
+
}, xstate131.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
};
|
|
117
|
-
}>,
|
|
117
|
+
}>, xstate131.Values<{
|
|
118
|
+
clearError: {
|
|
119
|
+
type: "clearError";
|
|
120
|
+
params: xstate131.NonReducibleUnknown;
|
|
121
|
+
};
|
|
118
122
|
setStream: {
|
|
119
123
|
type: "setStream";
|
|
120
|
-
params:
|
|
124
|
+
params: xstate131.NonReducibleUnknown;
|
|
121
125
|
};
|
|
122
126
|
setProgress: {
|
|
123
127
|
type: "setProgress";
|
|
124
|
-
params:
|
|
125
|
-
};
|
|
126
|
-
clearError: {
|
|
127
|
-
type: "clearError";
|
|
128
|
-
params: xstate199.NonReducibleUnknown;
|
|
128
|
+
params: xstate131.NonReducibleUnknown;
|
|
129
129
|
};
|
|
130
130
|
stopStream: {
|
|
131
131
|
type: "stopStream";
|
|
132
|
-
params:
|
|
132
|
+
params: xstate131.NonReducibleUnknown;
|
|
133
133
|
};
|
|
134
134
|
setCapturedDocument: {
|
|
135
135
|
type: "setCapturedDocument";
|
|
136
|
-
params:
|
|
136
|
+
params: xstate131.NonReducibleUnknown;
|
|
137
137
|
};
|
|
138
138
|
setFileTooLargeError: {
|
|
139
139
|
type: "setFileTooLargeError";
|
|
140
|
-
params:
|
|
140
|
+
params: xstate131.NonReducibleUnknown;
|
|
141
141
|
};
|
|
142
142
|
setUploadError: {
|
|
143
143
|
type: "setUploadError";
|
|
144
|
-
params:
|
|
144
|
+
params: xstate131.NonReducibleUnknown;
|
|
145
145
|
};
|
|
146
146
|
decrementAttemptsRemaining: {
|
|
147
147
|
type: "decrementAttemptsRemaining";
|
|
148
|
-
params:
|
|
148
|
+
params: xstate131.NonReducibleUnknown;
|
|
149
149
|
};
|
|
150
150
|
setCaptureMethodFile: {
|
|
151
151
|
type: "setCaptureMethodFile";
|
|
152
|
-
params:
|
|
152
|
+
params: xstate131.NonReducibleUnknown;
|
|
153
153
|
};
|
|
154
154
|
setCaptureMethodCamera: {
|
|
155
155
|
type: "setCaptureMethodCamera";
|
|
156
|
-
params:
|
|
156
|
+
params: xstate131.NonReducibleUnknown;
|
|
157
157
|
};
|
|
158
158
|
clearCapturedDocument: {
|
|
159
159
|
type: "clearCapturedDocument";
|
|
160
|
-
params:
|
|
160
|
+
params: xstate131.NonReducibleUnknown;
|
|
161
161
|
};
|
|
162
162
|
setPendingNextPage: {
|
|
163
163
|
type: "setPendingNextPage";
|
|
164
|
-
params:
|
|
164
|
+
params: xstate131.NonReducibleUnknown;
|
|
165
165
|
};
|
|
166
166
|
clearForNextPage: {
|
|
167
167
|
type: "clearForNextPage";
|
|
168
|
-
params:
|
|
168
|
+
params: xstate131.NonReducibleUnknown;
|
|
169
169
|
};
|
|
170
170
|
resetProgress: {
|
|
171
171
|
type: "resetProgress";
|
|
172
|
-
params:
|
|
172
|
+
params: xstate131.NonReducibleUnknown;
|
|
173
173
|
};
|
|
174
|
-
}>,
|
|
174
|
+
}>, xstate131.Values<{
|
|
175
175
|
allowSkip: {
|
|
176
176
|
type: "allowSkip";
|
|
177
177
|
params: unknown;
|
|
@@ -208,7 +208,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
|
|
|
208
208
|
type: "isPendingNextPage";
|
|
209
209
|
params: unknown;
|
|
210
210
|
};
|
|
211
|
-
}>, never, "
|
|
211
|
+
}>, never, "closed" | "finished" | "initCamera" | "capturing" | "uploading" | "tutorial" | "preview" | "failure" | "success", string, DocumentCaptureInput, xstate131.NonReducibleUnknown, xstate131.EventObject, xstate131.MetaObject, {
|
|
212
212
|
readonly id: "documentCapture";
|
|
213
213
|
readonly initial: "tutorial";
|
|
214
214
|
readonly context: ({
|
|
@@ -217,67 +217,67 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
|
|
|
217
217
|
spawn: {
|
|
218
218
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
219
219
|
src: "initCamera";
|
|
220
|
-
logic:
|
|
220
|
+
logic: xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>;
|
|
221
221
|
id: string | undefined;
|
|
222
222
|
} extends infer T ? T extends {
|
|
223
223
|
src: "initCamera";
|
|
224
|
-
logic:
|
|
224
|
+
logic: xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>;
|
|
225
225
|
id: string | undefined;
|
|
226
226
|
} ? T extends {
|
|
227
227
|
src: TSrc;
|
|
228
|
-
} ?
|
|
228
|
+
} ? xstate131.ConditionalRequired<[options?: ({
|
|
229
229
|
id?: T["id"] | undefined;
|
|
230
230
|
systemId?: string;
|
|
231
|
-
input?:
|
|
231
|
+
input?: xstate131.InputFrom<T["logic"]> | undefined;
|
|
232
232
|
syncSnapshot?: boolean;
|
|
233
|
-
} & { [K in
|
|
233
|
+
} & { [K in xstate131.RequiredActorOptions<T>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
234
234
|
src: "uploadDocument";
|
|
235
|
-
logic:
|
|
235
|
+
logic: xstate131.PromiseActorLogic<DocumentUploadResponse, {
|
|
236
236
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
237
237
|
processingType: string;
|
|
238
238
|
onProgress: (progress: number) => void;
|
|
239
|
-
},
|
|
239
|
+
}, xstate131.EventObject>;
|
|
240
240
|
id: string | undefined;
|
|
241
241
|
} extends infer T_1 ? T_1 extends {
|
|
242
242
|
src: "uploadDocument";
|
|
243
|
-
logic:
|
|
243
|
+
logic: xstate131.PromiseActorLogic<DocumentUploadResponse, {
|
|
244
244
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
245
245
|
processingType: string;
|
|
246
246
|
onProgress: (progress: number) => void;
|
|
247
|
-
},
|
|
247
|
+
}, xstate131.EventObject>;
|
|
248
248
|
id: string | undefined;
|
|
249
249
|
} ? T_1 extends {
|
|
250
250
|
src: TSrc;
|
|
251
|
-
} ?
|
|
251
|
+
} ? xstate131.ConditionalRequired<[options?: ({
|
|
252
252
|
id?: T_1["id"] | undefined;
|
|
253
253
|
systemId?: string;
|
|
254
|
-
input?:
|
|
254
|
+
input?: xstate131.InputFrom<T_1["logic"]> | undefined;
|
|
255
255
|
syncSnapshot?: boolean;
|
|
256
|
-
} & { [K_1 in
|
|
256
|
+
} & { [K_1 in xstate131.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T_1>>> : never : never : never)): xstate131.ActorRefFromLogic<xstate131.GetConcreteByKey<xstate131.Values<{
|
|
257
257
|
initCamera: {
|
|
258
258
|
src: "initCamera";
|
|
259
|
-
logic:
|
|
259
|
+
logic: xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>;
|
|
260
260
|
id: string | undefined;
|
|
261
261
|
};
|
|
262
262
|
uploadDocument: {
|
|
263
263
|
src: "uploadDocument";
|
|
264
|
-
logic:
|
|
264
|
+
logic: xstate131.PromiseActorLogic<DocumentUploadResponse, {
|
|
265
265
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
266
266
|
processingType: string;
|
|
267
267
|
onProgress: (progress: number) => void;
|
|
268
|
-
},
|
|
268
|
+
}, xstate131.EventObject>;
|
|
269
269
|
id: string | undefined;
|
|
270
270
|
};
|
|
271
271
|
}>, "src", TSrc>["logic"]>;
|
|
272
|
-
<TLogic extends
|
|
272
|
+
<TLogic extends xstate131.AnyActorLogic>(src: TLogic, ...[options]: xstate131.ConditionalRequired<[options?: ({
|
|
273
273
|
id?: never;
|
|
274
274
|
systemId?: string;
|
|
275
|
-
input?:
|
|
275
|
+
input?: xstate131.InputFrom<TLogic> | undefined;
|
|
276
276
|
syncSnapshot?: boolean;
|
|
277
|
-
} & { [K in
|
|
277
|
+
} & { [K in xstate131.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredLogicInput<TLogic>>>): xstate131.ActorRefFromLogic<TLogic>;
|
|
278
278
|
};
|
|
279
279
|
input: DocumentCaptureInput;
|
|
280
|
-
self:
|
|
280
|
+
self: xstate131.ActorRef<xstate131.MachineSnapshot<DocumentCaptureContext, {
|
|
281
281
|
type: "CAPTURE";
|
|
282
282
|
} | {
|
|
283
283
|
type: "FILE_SELECTED";
|
|
@@ -299,7 +299,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
|
|
|
299
299
|
type: "SKIP";
|
|
300
300
|
} | {
|
|
301
301
|
type: "CLOSE";
|
|
302
|
-
}, Record<string,
|
|
302
|
+
}, Record<string, xstate131.AnyActorRef | undefined>, xstate131.StateValue, string, unknown, any, any>, {
|
|
303
303
|
type: "CAPTURE";
|
|
304
304
|
} | {
|
|
305
305
|
type: "FILE_SELECTED";
|
|
@@ -321,7 +321,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
|
|
|
321
321
|
type: "SKIP";
|
|
322
322
|
} | {
|
|
323
323
|
type: "CLOSE";
|
|
324
|
-
},
|
|
324
|
+
}, xstate131.AnyEventObject>;
|
|
325
325
|
}) => {
|
|
326
326
|
config: {
|
|
327
327
|
processingType: DocumentType;
|
|
@@ -458,7 +458,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
|
|
|
458
458
|
} | {
|
|
459
459
|
type: "CLOSE";
|
|
460
460
|
};
|
|
461
|
-
self:
|
|
461
|
+
self: xstate131.ActorRef<xstate131.MachineSnapshot<DocumentCaptureContext, {
|
|
462
462
|
type: "CAPTURE";
|
|
463
463
|
} | {
|
|
464
464
|
type: "FILE_SELECTED";
|
|
@@ -480,7 +480,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
|
|
|
480
480
|
type: "SKIP";
|
|
481
481
|
} | {
|
|
482
482
|
type: "CLOSE";
|
|
483
|
-
}, Record<string,
|
|
483
|
+
}, Record<string, xstate131.AnyActorRef>, xstate131.StateValue, string, unknown, any, any>, {
|
|
484
484
|
type: "CAPTURE";
|
|
485
485
|
} | {
|
|
486
486
|
type: "FILE_SELECTED";
|
|
@@ -502,7 +502,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
|
|
|
502
502
|
type: "SKIP";
|
|
503
503
|
} | {
|
|
504
504
|
type: "CLOSE";
|
|
505
|
-
},
|
|
505
|
+
}, xstate131.AnyEventObject>;
|
|
506
506
|
}) => {
|
|
507
507
|
capturedDocument: CapturedDocument;
|
|
508
508
|
processingType: DocumentType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as createActor, n as eventModuleNames, o as createManagerInstrumentation, v as setup, x as fromPromise, y as assign } from "./events-Cc1xUUgF.esm.js";
|
|
2
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
2
|
+
import { t as getBackCameraStream } from "./backCameraStream-jiRgi6k7.esm.js";
|
|
3
3
|
import { A as stopCameraStream, j as createManager } from "./src-DCc0dMkT.esm.js";
|
|
4
4
|
import { t as api } from "./api-G4JA8CXK.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { f as Manager } from "./index-BTaLQSj9.js";
|
|
2
2
|
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-oveF7RrS.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as xstate67 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
6
|
-
declare const documentUploadMachine:
|
|
6
|
+
declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext, {
|
|
7
7
|
type: "START";
|
|
8
8
|
} | {
|
|
9
9
|
type: "CAPTURE";
|
|
@@ -16,52 +16,52 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
|
|
|
16
16
|
} | {
|
|
17
17
|
type: "CLOSE";
|
|
18
18
|
}, {
|
|
19
|
-
[x: string]:
|
|
19
|
+
[x: string]: xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>> | xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<void, {
|
|
20
20
|
imageBase64: string;
|
|
21
21
|
documentType: string;
|
|
22
22
|
onProgress: (progress: number) => void;
|
|
23
|
-
},
|
|
24
|
-
},
|
|
23
|
+
}, xstate67.EventObject>> | undefined;
|
|
24
|
+
}, xstate67.Values<{
|
|
25
25
|
initCamera: {
|
|
26
26
|
src: "initCamera";
|
|
27
|
-
logic:
|
|
27
|
+
logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
|
|
28
28
|
id: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
uploadDocument: {
|
|
31
31
|
src: "uploadDocument";
|
|
32
|
-
logic:
|
|
32
|
+
logic: xstate67.PromiseActorLogic<void, {
|
|
33
33
|
imageBase64: string;
|
|
34
34
|
documentType: string;
|
|
35
35
|
onProgress: (progress: number) => void;
|
|
36
|
-
},
|
|
36
|
+
}, xstate67.EventObject>;
|
|
37
37
|
id: string | undefined;
|
|
38
38
|
};
|
|
39
|
-
}>,
|
|
39
|
+
}>, xstate67.Values<{
|
|
40
|
+
setError: {
|
|
41
|
+
type: "setError";
|
|
42
|
+
params: xstate67.NonReducibleUnknown;
|
|
43
|
+
};
|
|
44
|
+
clearError: {
|
|
45
|
+
type: "clearError";
|
|
46
|
+
params: xstate67.NonReducibleUnknown;
|
|
47
|
+
};
|
|
40
48
|
setStream: {
|
|
41
49
|
type: "setStream";
|
|
42
|
-
params:
|
|
50
|
+
params: xstate67.NonReducibleUnknown;
|
|
43
51
|
};
|
|
44
52
|
setImageAndClearError: {
|
|
45
53
|
type: "setImageAndClearError";
|
|
46
|
-
params:
|
|
54
|
+
params: xstate67.NonReducibleUnknown;
|
|
47
55
|
};
|
|
48
56
|
setProgress: {
|
|
49
57
|
type: "setProgress";
|
|
50
|
-
params:
|
|
51
|
-
};
|
|
52
|
-
setError: {
|
|
53
|
-
type: "setError";
|
|
54
|
-
params: xstate0.NonReducibleUnknown;
|
|
55
|
-
};
|
|
56
|
-
clearError: {
|
|
57
|
-
type: "clearError";
|
|
58
|
-
params: xstate0.NonReducibleUnknown;
|
|
58
|
+
params: xstate67.NonReducibleUnknown;
|
|
59
59
|
};
|
|
60
60
|
stopStream: {
|
|
61
61
|
type: "stopStream";
|
|
62
|
-
params:
|
|
62
|
+
params: xstate67.NonReducibleUnknown;
|
|
63
63
|
};
|
|
64
|
-
}>, never, never, "error" | "
|
|
64
|
+
}>, never, never, "error" | "idle" | "closed" | "finished" | "initCamera" | "capturing" | "uploading", string, DocumentUploadInput, xstate67.NonReducibleUnknown, xstate67.EventObject, xstate67.MetaObject, {
|
|
65
65
|
readonly id: "documentUpload";
|
|
66
66
|
readonly initial: "idle";
|
|
67
67
|
readonly context: ({
|
|
@@ -70,67 +70,67 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
|
|
|
70
70
|
spawn: {
|
|
71
71
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
72
72
|
src: "initCamera";
|
|
73
|
-
logic:
|
|
73
|
+
logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
|
|
74
74
|
id: string | undefined;
|
|
75
75
|
} extends infer T ? T extends {
|
|
76
76
|
src: "initCamera";
|
|
77
|
-
logic:
|
|
77
|
+
logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
|
|
78
78
|
id: string | undefined;
|
|
79
79
|
} ? T extends {
|
|
80
80
|
src: TSrc;
|
|
81
|
-
} ?
|
|
81
|
+
} ? xstate67.ConditionalRequired<[options?: ({
|
|
82
82
|
id?: T["id"] | undefined;
|
|
83
83
|
systemId?: string;
|
|
84
|
-
input?:
|
|
84
|
+
input?: xstate67.InputFrom<T["logic"]> | undefined;
|
|
85
85
|
syncSnapshot?: boolean;
|
|
86
|
-
} & { [K in
|
|
86
|
+
} & { [K in xstate67.RequiredActorOptions<T>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
87
87
|
src: "uploadDocument";
|
|
88
|
-
logic:
|
|
88
|
+
logic: xstate67.PromiseActorLogic<void, {
|
|
89
89
|
imageBase64: string;
|
|
90
90
|
documentType: string;
|
|
91
91
|
onProgress: (progress: number) => void;
|
|
92
|
-
},
|
|
92
|
+
}, xstate67.EventObject>;
|
|
93
93
|
id: string | undefined;
|
|
94
94
|
} extends infer T_1 ? T_1 extends {
|
|
95
95
|
src: "uploadDocument";
|
|
96
|
-
logic:
|
|
96
|
+
logic: xstate67.PromiseActorLogic<void, {
|
|
97
97
|
imageBase64: string;
|
|
98
98
|
documentType: string;
|
|
99
99
|
onProgress: (progress: number) => void;
|
|
100
|
-
},
|
|
100
|
+
}, xstate67.EventObject>;
|
|
101
101
|
id: string | undefined;
|
|
102
102
|
} ? T_1 extends {
|
|
103
103
|
src: TSrc;
|
|
104
|
-
} ?
|
|
104
|
+
} ? xstate67.ConditionalRequired<[options?: ({
|
|
105
105
|
id?: T_1["id"] | undefined;
|
|
106
106
|
systemId?: string;
|
|
107
|
-
input?:
|
|
107
|
+
input?: xstate67.InputFrom<T_1["logic"]> | undefined;
|
|
108
108
|
syncSnapshot?: boolean;
|
|
109
|
-
} & { [K_1 in
|
|
109
|
+
} & { [K_1 in xstate67.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T_1>>> : never : never : never)): xstate67.ActorRefFromLogic<xstate67.GetConcreteByKey<xstate67.Values<{
|
|
110
110
|
initCamera: {
|
|
111
111
|
src: "initCamera";
|
|
112
|
-
logic:
|
|
112
|
+
logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
|
|
113
113
|
id: string | undefined;
|
|
114
114
|
};
|
|
115
115
|
uploadDocument: {
|
|
116
116
|
src: "uploadDocument";
|
|
117
|
-
logic:
|
|
117
|
+
logic: xstate67.PromiseActorLogic<void, {
|
|
118
118
|
imageBase64: string;
|
|
119
119
|
documentType: string;
|
|
120
120
|
onProgress: (progress: number) => void;
|
|
121
|
-
},
|
|
121
|
+
}, xstate67.EventObject>;
|
|
122
122
|
id: string | undefined;
|
|
123
123
|
};
|
|
124
124
|
}>, "src", TSrc>["logic"]>;
|
|
125
|
-
<TLogic extends
|
|
125
|
+
<TLogic extends xstate67.AnyActorLogic>(src: TLogic, ...[options]: xstate67.ConditionalRequired<[options?: ({
|
|
126
126
|
id?: never;
|
|
127
127
|
systemId?: string;
|
|
128
|
-
input?:
|
|
128
|
+
input?: xstate67.InputFrom<TLogic> | undefined;
|
|
129
129
|
syncSnapshot?: boolean;
|
|
130
|
-
} & { [K in
|
|
130
|
+
} & { [K in xstate67.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredLogicInput<TLogic>>>): xstate67.ActorRefFromLogic<TLogic>;
|
|
131
131
|
};
|
|
132
132
|
input: DocumentUploadInput;
|
|
133
|
-
self:
|
|
133
|
+
self: xstate67.ActorRef<xstate67.MachineSnapshot<DocumentUploadContext, {
|
|
134
134
|
type: "START";
|
|
135
135
|
} | {
|
|
136
136
|
type: "CAPTURE";
|
|
@@ -142,7 +142,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
|
|
|
142
142
|
type: "RETRY";
|
|
143
143
|
} | {
|
|
144
144
|
type: "CLOSE";
|
|
145
|
-
}, Record<string,
|
|
145
|
+
}, Record<string, xstate67.AnyActorRef | undefined>, xstate67.StateValue, string, unknown, any, any>, {
|
|
146
146
|
type: "START";
|
|
147
147
|
} | {
|
|
148
148
|
type: "CAPTURE";
|
|
@@ -154,7 +154,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
|
|
|
154
154
|
type: "RETRY";
|
|
155
155
|
} | {
|
|
156
156
|
type: "CLOSE";
|
|
157
|
-
},
|
|
157
|
+
}, xstate67.AnyEventObject>;
|
|
158
158
|
}) => {
|
|
159
159
|
config: DocumentUploadConfig;
|
|
160
160
|
stream: undefined;
|
|
@@ -224,7 +224,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
|
|
|
224
224
|
} | {
|
|
225
225
|
type: "CLOSE";
|
|
226
226
|
};
|
|
227
|
-
self:
|
|
227
|
+
self: xstate67.ActorRef<xstate67.MachineSnapshot<DocumentUploadContext, {
|
|
228
228
|
type: "START";
|
|
229
229
|
} | {
|
|
230
230
|
type: "CAPTURE";
|
|
@@ -236,7 +236,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
|
|
|
236
236
|
type: "RETRY";
|
|
237
237
|
} | {
|
|
238
238
|
type: "CLOSE";
|
|
239
|
-
}, Record<string,
|
|
239
|
+
}, Record<string, xstate67.AnyActorRef>, xstate67.StateValue, string, unknown, any, any>, {
|
|
240
240
|
type: "START";
|
|
241
241
|
} | {
|
|
242
242
|
type: "CAPTURE";
|
|
@@ -248,7 +248,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
|
|
|
248
248
|
type: "RETRY";
|
|
249
249
|
} | {
|
|
250
250
|
type: "CLOSE";
|
|
251
|
-
},
|
|
251
|
+
}, xstate67.AnyEventObject>;
|
|
252
252
|
}) => {
|
|
253
253
|
imageBase64: string;
|
|
254
254
|
documentType: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as createActor, n as eventModuleNames, o as createManagerInstrumentation, v as setup, x as fromPromise, y as assign } from "./events-Cc1xUUgF.esm.js";
|
|
2
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
2
|
+
import { t as getBackCameraStream } from "./backCameraStream-jiRgi6k7.esm.js";
|
|
3
3
|
import { A as stopCameraStream, j as createManager } from "./src-DCc0dMkT.esm.js";
|
|
4
4
|
import { t as api } from "./api-G4JA8CXK.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
|
package/dist/extensibility.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { S as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureState, t as IdCaptureManager } from "./idCaptureManager-Dc2NJMy_.js";
|
|
2
2
|
import { l as createActor, s as fromPromise } from "./index-BTaLQSj9.js";
|
|
3
3
|
import { i as IStorageCapability } from "./deepsightService-DxA--87N.js";
|
|
4
|
-
import { C as WasmUtilConfig, S as VirtualCameraCheckOutput, b as BaseWasmProvider, c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine, x as IWasmUtilCapability } from "./faceCaptureManagerFactory-
|
|
4
|
+
import { C as WasmUtilConfig, S as VirtualCameraCheckOutput, b as BaseWasmProvider, c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine, x as IWasmUtilCapability } from "./faceCaptureManagerFactory-CGpkO_S3.js";
|
|
5
5
|
import "./warmup-CzfSiaMj.js";
|
|
6
6
|
import "./types-oveF7RrS.js";
|
|
7
7
|
import "./types-mQLzH6uw.js";
|
|
8
|
-
import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-
|
|
9
|
-
import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-
|
|
8
|
+
import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-B4Nnp7ws.js";
|
|
9
|
+
import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-TaI12wf3.js";
|
|
10
10
|
import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-DsAtfVR-.js";
|
|
11
11
|
import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-CenWu6bP.js";
|
|
12
12
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { S as createActor, x as fromPromise } from "./events-Cc1xUUgF.esm.js";
|
|
2
|
-
import "./backCameraStream-
|
|
2
|
+
import "./backCameraStream-jiRgi6k7.esm.js";
|
|
3
3
|
import { o as WasmUtilProvider, v as BrowserStorageProvider } from "./src-DCc0dMkT.esm.js";
|
|
4
4
|
import "./recordingsRepository-COovU1i4.esm.js";
|
|
5
5
|
import "./browserSimulation-C8gNnn5p.esm.js";
|
|
6
6
|
import "./api-G4JA8CXK.esm.js";
|
|
7
7
|
import "./endpoints-CCuj1KZH.esm.js";
|
|
8
8
|
import "./session-CRPiwwF-.esm.js";
|
|
9
|
-
import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-
|
|
9
|
+
import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-BxlkQJq-.esm.js";
|
|
10
10
|
import "./deepsightService-lTQvj-Wf.esm.js";
|
|
11
11
|
import "./stats-D0m3TvIg.esm.js";
|
|
12
|
-
import { t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
13
|
-
import { n as createAuthenticationManagerFromActor } from "./authenticationManager-
|
|
12
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-CP7WXoGS.esm.js";
|
|
13
|
+
import { n as createAuthenticationManagerFromActor } from "./authenticationManager-CoeHnXPS.esm.js";
|
|
14
14
|
import { n as createEmailManagerFromActor } from "./emailManager-Bl3NqSZ-.esm.js";
|
|
15
|
-
import { n as createSelfieManagerFromActor } from "./selfieManager-
|
|
15
|
+
import { n as createSelfieManagerFromActor } from "./selfieManager-DZTwDE-b.esm.js";
|
|
16
16
|
import { n as createPhoneManagerFromActor } from "./phoneManager-2NN9q777.esm.js";
|
|
17
17
|
|
|
18
18
|
export { BrowserStorageProvider, WasmUtilProvider, createActor, createAuthenticationManagerFromActor, createEmailManagerFromActor, createIdCaptureManagerFromActor, createPhoneManagerFromActor, createSelfieManagerFromActor, faceCaptureMachine, fromPromise };
|
package/dist/{faceCaptureManagerFactory-MPKxiFCQ.d.ts → faceCaptureManagerFactory-CGpkO_S3.d.ts}
RENAMED
|
@@ -304,6 +304,10 @@ type AuthenticationMachine = typeof _authenticationMachine;
|
|
|
304
304
|
declare const authenticationMachine: AnyStateMachine;
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region src/internal/faceCapture/types.d.ts
|
|
307
|
+
type CameraResolution = {
|
|
308
|
+
width?: number;
|
|
309
|
+
height?: number;
|
|
310
|
+
};
|
|
307
311
|
type BaseFaceCaptureConfig = {
|
|
308
312
|
showTutorial: boolean;
|
|
309
313
|
showPreview?: boolean;
|
|
@@ -318,6 +322,7 @@ type BaseFaceCaptureConfig = {
|
|
|
318
322
|
validateClosedEyes?: boolean;
|
|
319
323
|
validateBrightness?: boolean;
|
|
320
324
|
deepsightLiveness?: 'SINGLE_FRAME' | 'MULTIMODAL' | 'VIDEOLIVENESS';
|
|
325
|
+
cameraResolution?: CameraResolution;
|
|
321
326
|
recording?: {
|
|
322
327
|
capability?: IRecordingCapability;
|
|
323
328
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as fromCallback, o as createManagerInstrumentation, v as setup, x as fromPromise, y as assign } from "./events-Cc1xUUgF.esm.js";
|
|
2
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
3
|
-
import { A as stopCameraStream, C as StreamCanvasCapture, S as StreamCanvasProcessingSession, c as FaceDetectionProvider, f as OpenViduRecordingProvider, j as createManager, k as requestCameraAccess, m as LocalRecordingProvider } from "./src-DCc0dMkT.esm.js";
|
|
2
|
+
import { n as getDesktopCameraStream, t as getBackCameraStream } from "./backCameraStream-jiRgi6k7.esm.js";
|
|
3
|
+
import { A as stopCameraStream, B as isIPhone14OrHigher, C as StreamCanvasCapture, L as isDesktop, S as StreamCanvasProcessingSession, c as FaceDetectionProvider, f as OpenViduRecordingProvider, j as createManager, k as requestCameraAccess, m as LocalRecordingProvider } from "./src-DCc0dMkT.esm.js";
|
|
4
4
|
import { a as checkPermission, i as uploadDeepsightVideo, n as startRecording, o as requestPermission, r as stopRecording$1, s as flagFaceManualReview, t as createRecordingSession, u as getDeviceClass } from "./recordingsRepository-COovU1i4.esm.js";
|
|
5
5
|
import { r as getToken, t as api } from "./api-G4JA8CXK.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
|
|
@@ -207,7 +207,7 @@ async function processFace(imageType = "selfie", signal) {
|
|
|
207
207
|
function sendLabelInspectionEvent() {
|
|
208
208
|
return addDeviceStats({ cameraLabelInspectionStatus: "FAIL" });
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const MOBILE_SELFIE_CONSTRAINTS = {
|
|
211
211
|
video: {
|
|
212
212
|
facingMode: "user",
|
|
213
213
|
height: { ideal: 480 },
|
|
@@ -215,11 +215,33 @@ const CAMERA_CONSTRAINTS = {
|
|
|
215
215
|
},
|
|
216
216
|
audio: false
|
|
217
217
|
};
|
|
218
|
+
const IPHONE14_SELFIE_CONSTRAINTS = {
|
|
219
|
+
video: { height: { ideal: 1080 } },
|
|
220
|
+
audio: false
|
|
221
|
+
};
|
|
222
|
+
function buildCameraConstraints(resolution) {
|
|
223
|
+
if (resolution) return {
|
|
224
|
+
video: {
|
|
225
|
+
facingMode: "user",
|
|
226
|
+
height: resolution.height ? { ideal: resolution.height } : void 0,
|
|
227
|
+
width: resolution.width ? { ideal: resolution.width } : void 0
|
|
228
|
+
},
|
|
229
|
+
audio: false
|
|
230
|
+
};
|
|
231
|
+
if (isIPhone14OrHigher()) return IPHONE14_SELFIE_CONSTRAINTS;
|
|
232
|
+
return MOBILE_SELFIE_CONSTRAINTS;
|
|
233
|
+
}
|
|
218
234
|
function stopStream(stream) {
|
|
219
235
|
stopCameraStream(stream);
|
|
220
236
|
}
|
|
237
|
+
async function getFrontCameraStream(resolution) {
|
|
238
|
+
if (resolution) return requestCameraAccess(buildCameraConstraints(resolution));
|
|
239
|
+
if (isDesktop()) return getDesktopCameraStream({});
|
|
240
|
+
return requestCameraAccess(buildCameraConstraints());
|
|
241
|
+
}
|
|
221
242
|
async function initializeCamera(params) {
|
|
222
243
|
const { config } = params;
|
|
244
|
+
const prcConstraints = buildCameraConstraints(config.cameraResolution);
|
|
223
245
|
const provider = new FaceDetectionProvider();
|
|
224
246
|
await provider.initialize({ autocaptureInterval: config.autoCaptureTimeout * 1e3 });
|
|
225
247
|
provider.setChecksEnabled({
|
|
@@ -229,12 +251,9 @@ async function initializeCamera(params) {
|
|
|
229
251
|
headWear: config.validateHeadCover ?? false,
|
|
230
252
|
occlusion: false
|
|
231
253
|
});
|
|
232
|
-
await params.deepsightService.performPrcCheck({ constraints: { video:
|
|
254
|
+
await params.deepsightService.performPrcCheck({ constraints: { video: prcConstraints.video } });
|
|
233
255
|
return {
|
|
234
|
-
stream: config.assistedOnboarding ? await getBackCameraStream() : await
|
|
235
|
-
video: CAMERA_CONSTRAINTS.video,
|
|
236
|
-
audio: false
|
|
237
|
-
}),
|
|
256
|
+
stream: config.assistedOnboarding ? await getBackCameraStream() : await getFrontCameraStream(config.cameraResolution),
|
|
238
257
|
provider
|
|
239
258
|
};
|
|
240
259
|
}
|
package/dist/id.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./events-Cc1xUUgF.esm.js";
|
|
2
|
-
import "./backCameraStream-
|
|
2
|
+
import "./backCameraStream-jiRgi6k7.esm.js";
|
|
3
3
|
import "./src-DCc0dMkT.esm.js";
|
|
4
4
|
import "./recordingsRepository-COovU1i4.esm.js";
|
|
5
5
|
import "./browserSimulation-C8gNnn5p.esm.js";
|
|
6
6
|
import "./api-G4JA8CXK.esm.js";
|
|
7
7
|
import "./endpoints-CCuj1KZH.esm.js";
|
|
8
8
|
import "./session-CRPiwwF-.esm.js";
|
|
9
|
-
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-
|
|
9
|
+
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-BxlkQJq-.esm.js";
|
|
10
10
|
import "./deepsightService-lTQvj-Wf.esm.js";
|
|
11
11
|
import "./stats-D0m3TvIg.esm.js";
|
|
12
12
|
import "./id-B30uqGbp.esm.js";
|