@ekyc_qoobiss/qbs-ect-cmp 3.6.39 → 3.6.41
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/cjs/{TranslationUtils-bfe4477a.js → TranslationUtils-dd73945b.js} +31 -43
- package/dist/cjs/{agreement-check_19.cjs.entry.js → agreement-check_17.cjs.entry.js} +245 -882
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/cjs/random-actions.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -3
- package/dist/collection/components/common/how-to-info/how-to-info.js +11 -34
- package/dist/collection/components/common/id-capture/id-capture.js +39 -19
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +26 -27
- package/dist/collection/components/controls/camera/camera.js +1 -62
- package/dist/collection/components/flow/agreement-info/agreement-info.js +4 -5
- package/dist/collection/components/flow/landing-validation/landing-validation.js +11 -19
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +1 -1
- package/dist/collection/components/flow/process-id/process-id.js +47 -161
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +7 -56
- package/dist/collection/components/flow/sms-send/sms-send.css +0 -0
- package/dist/collection/components/flow/sms-send/sms-send.js +91 -0
- package/dist/collection/components/flow/user-liveness/user-liveness.js +45 -118
- package/dist/collection/components/identification-component/identification-component.js +14 -41
- package/dist/collection/helpers/ApiCall.js +14 -15
- package/dist/collection/helpers/ML5.js +1 -1
- package/dist/collection/helpers/Stream.js +1 -47
- package/dist/collection/helpers/store.js +0 -18
- package/dist/collection/helpers/textValues.js +2 -0
- package/dist/collection/models/CaptureFlow.js +0 -16
- package/dist/collection/models/FlowStatus.js +16 -10
- package/dist/esm/{TranslationUtils-7e68bc94.js → TranslationUtils-741a728a.js} +31 -43
- package/dist/esm/{agreement-check_19.entry.js → agreement-check_17.entry.js} +245 -880
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/esm/random-actions.entry.js +1 -1
- package/dist/qbs-ect-cmp/p-87c689d6.js +1 -0
- package/dist/qbs-ect-cmp/{p-d1d9feaf.entry.js → p-a130edd5.entry.js} +1 -1
- package/dist/qbs-ect-cmp/{p-4e3b735b.entry.js → p-b3fa0a37.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/how-to-info/how-to-info.d.ts +0 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +5 -1
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +3 -2
- package/dist/types/components/controls/camera/camera.d.ts +0 -7
- package/dist/types/components/flow/process-id/process-id.d.ts +0 -3
- package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +0 -3
- package/dist/types/components/flow/sms-send/sms-send.d.ts +17 -0
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +2 -6
- package/dist/types/components/identification-component/identification-component.d.ts +1 -2
- package/dist/types/components.d.ts +18 -65
- package/dist/types/helpers/ApiCall.d.ts +9 -3
- package/dist/types/helpers/Stream.d.ts +0 -11
- package/dist/types/helpers/textValues.d.ts +2 -0
- package/dist/types/models/CaptureFlow.d.ts +2 -19
- package/dist/types/models/FlowStatus.d.ts +18 -10
- package/dist/types/models/IAbortResult.d.ts +1 -0
- package/dist/types/models/IAddRequest.d.ts +1 -1
- package/dist/types/models/IEctStore.d.ts +0 -6
- package/dist/types/models/IOtpCheck.d.ts +1 -0
- package/dist/types/models/IOtpSend.d.ts +1 -0
- package/dist/types/models/IUploadFile.d.ts +1 -0
- package/package.json +1 -1
- package/dist/collection/components/common/id-back-capture/id-back-capture.css +0 -35
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +0 -219
- package/dist/collection/components/common/id-tilt/id-tilt.css +0 -35
- package/dist/collection/components/common/id-tilt/id-tilt.js +0 -220
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.css +0 -7
- package/dist/collection/components/common/selfie-tilt/selfie-tilt.js +0 -221
- package/dist/qbs-ect-cmp/p-d35256e9.js +0 -1
- package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +0 -28
- package/dist/types/components/common/id-tilt/id-tilt.d.ts +0 -28
- package/dist/types/components/common/selfie-tilt/selfie-tilt.d.ts +0 -31
|
@@ -203,16 +203,21 @@ const createStore = (defaultState, shouldUpdate) => {
|
|
|
203
203
|
var FlowStatus;
|
|
204
204
|
(function (FlowStatus) {
|
|
205
205
|
FlowStatus[FlowStatus["LANDING"] = 0] = "LANDING";
|
|
206
|
-
FlowStatus[FlowStatus["
|
|
207
|
-
FlowStatus[FlowStatus["
|
|
208
|
-
FlowStatus[FlowStatus["
|
|
209
|
-
FlowStatus[FlowStatus["
|
|
210
|
-
FlowStatus[FlowStatus["
|
|
211
|
-
FlowStatus[FlowStatus["
|
|
212
|
-
FlowStatus[FlowStatus["
|
|
213
|
-
FlowStatus[FlowStatus["
|
|
214
|
-
FlowStatus[FlowStatus["
|
|
215
|
-
FlowStatus[FlowStatus["
|
|
206
|
+
FlowStatus[FlowStatus["MOBILE"] = 1] = "MOBILE";
|
|
207
|
+
FlowStatus[FlowStatus["AGREEMENT"] = 2] = "AGREEMENT";
|
|
208
|
+
FlowStatus[FlowStatus["PHONE"] = 3] = "PHONE";
|
|
209
|
+
FlowStatus[FlowStatus["CODE"] = 4] = "CODE";
|
|
210
|
+
FlowStatus[FlowStatus["CODEERROR"] = 5] = "CODEERROR";
|
|
211
|
+
FlowStatus[FlowStatus["IDFRONT"] = 6] = "IDFRONT";
|
|
212
|
+
FlowStatus[FlowStatus["IDBACK"] = 7] = "IDBACK";
|
|
213
|
+
FlowStatus[FlowStatus["IDTILT"] = 8] = "IDTILT";
|
|
214
|
+
FlowStatus[FlowStatus["LIVENESS"] = 9] = "LIVENESS";
|
|
215
|
+
FlowStatus[FlowStatus["LIVENESSGESTURE"] = 10] = "LIVENESSGESTURE";
|
|
216
|
+
FlowStatus[FlowStatus["COMPLETE"] = 11] = "COMPLETE";
|
|
217
|
+
FlowStatus[FlowStatus["ERROREND"] = 12] = "ERROREND";
|
|
218
|
+
FlowStatus[FlowStatus["CAMERAERROR"] = 13] = "CAMERAERROR";
|
|
219
|
+
FlowStatus[FlowStatus["ABORTED"] = 14] = "ABORTED";
|
|
220
|
+
FlowStatus[FlowStatus["NONE"] = 15] = "NONE";
|
|
216
221
|
})(FlowStatus || (FlowStatus = {}));
|
|
217
222
|
|
|
218
223
|
class IdCaptureValues {
|
|
@@ -261,6 +266,8 @@ class ApiUrls {
|
|
|
261
266
|
this.AddStep = this.uriEnv + 'validation/logs/step';
|
|
262
267
|
this.AbortRequest = this.uriEnv + 'validation/identity/abort';
|
|
263
268
|
this.Translations = this.uriEnv + 'validation/translations/get';
|
|
269
|
+
this.StartFlow = this.uriEnv + 'flowstate/startflow';
|
|
270
|
+
this.NextFlowState = this.uriEnv + 'flowstate/getnextstate';
|
|
264
271
|
}
|
|
265
272
|
}
|
|
266
273
|
|
|
@@ -270,15 +277,9 @@ const { state, onChange } = createStore({
|
|
|
270
277
|
debug: false,
|
|
271
278
|
requestId: '',
|
|
272
279
|
redirectId: '',
|
|
273
|
-
initialised: false,
|
|
274
280
|
token: '',
|
|
275
281
|
cameraIds: [],
|
|
276
282
|
cameraId: '',
|
|
277
|
-
hasIdBack: false,
|
|
278
|
-
hasSelfieGesture: false,
|
|
279
|
-
hasIdTilt: false,
|
|
280
|
-
agreementsValidation: true,
|
|
281
|
-
phoneValidation: true,
|
|
282
283
|
phoneNumber: '',
|
|
283
284
|
apiBaseUrl: 'https://apiro.id-kyc.com',
|
|
284
285
|
device: null,
|
|
@@ -295,18 +296,6 @@ onChange('token', value => {
|
|
|
295
296
|
});
|
|
296
297
|
onChange('requestId', value => {
|
|
297
298
|
sessionStorage.setItem(SessionKeys.RequestIdKey, value);
|
|
298
|
-
});
|
|
299
|
-
onChange('initialised', value => {
|
|
300
|
-
sessionStorage.setItem(SessionKeys.InitialisedKey, String(value));
|
|
301
|
-
});
|
|
302
|
-
onChange('hasIdBack', value => {
|
|
303
|
-
sessionStorage.setItem(SessionKeys.HasIdBackKey, String(value));
|
|
304
|
-
});
|
|
305
|
-
onChange('agreementsValidation', value => {
|
|
306
|
-
sessionStorage.setItem(SessionKeys.AgreementValidationKey, String(value));
|
|
307
|
-
});
|
|
308
|
-
onChange('phoneValidation', value => {
|
|
309
|
-
sessionStorage.setItem(SessionKeys.PhoneValidationKey, String(value));
|
|
310
299
|
});
|
|
311
300
|
|
|
312
301
|
var FlowSteps;
|
|
@@ -471,12 +460,12 @@ class ApiCall {
|
|
|
471
460
|
async SendOTPCode(requestId, phoneNumber) {
|
|
472
461
|
let data = { requestId: requestId, phone: phoneNumber };
|
|
473
462
|
let jsonResp = await this.post(this.urls.OtpSend, JSON.stringify(data));
|
|
474
|
-
return jsonResp
|
|
463
|
+
return jsonResp;
|
|
475
464
|
}
|
|
476
465
|
async CheckOTPCode(requestId, otpCode) {
|
|
477
466
|
let data = { requestId: requestId, otp: otpCode };
|
|
478
467
|
let jsonResp = await this.post(this.urls.OtpCheck, JSON.stringify(data));
|
|
479
|
-
return jsonResp
|
|
468
|
+
return jsonResp;
|
|
480
469
|
}
|
|
481
470
|
async AddIdentificationRequest(deviceInfo, version) {
|
|
482
471
|
if (state.debug)
|
|
@@ -492,12 +481,8 @@ class ApiCall {
|
|
|
492
481
|
if (state.requestId == '') {
|
|
493
482
|
state.requestId = jsonResp.requestId;
|
|
494
483
|
}
|
|
495
|
-
state.hasIdBack = jsonResp.hasIdBack;
|
|
496
|
-
state.hasIdTilt = jsonResp.hasIdTilt;
|
|
497
|
-
state.hasSelfieGesture = jsonResp.hasSelfieGesture;
|
|
498
|
-
state.agreementsValidation = jsonResp.agreementsValidation;
|
|
499
|
-
state.phoneValidation = jsonResp.phoneValidation;
|
|
500
484
|
state.phoneNumber = jsonResp.phoneNumber;
|
|
485
|
+
state.flowStatus = FlowStatus[jsonResp.status];
|
|
501
486
|
return true;
|
|
502
487
|
}
|
|
503
488
|
async UploadFileForRequestB64(requestId, type, file) {
|
|
@@ -507,13 +492,8 @@ class ApiCall {
|
|
|
507
492
|
data: await this.toBase64(file),
|
|
508
493
|
};
|
|
509
494
|
let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
}
|
|
513
|
-
if (state.hasIdBack && type == 'IdBack') {
|
|
514
|
-
return respJson.isValid;
|
|
515
|
-
}
|
|
516
|
-
if (type == 'Selfie') {
|
|
495
|
+
state.flowStatus = FlowStatus[respJson.state];
|
|
496
|
+
if (type in ['IdFront', 'IdBack', 'Selfie']) {
|
|
517
497
|
return respJson.isValid;
|
|
518
498
|
}
|
|
519
499
|
return true;
|
|
@@ -555,12 +535,20 @@ class ApiCall {
|
|
|
555
535
|
}
|
|
556
536
|
async AbortRequest() {
|
|
557
537
|
let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: state.requestId }));
|
|
558
|
-
return result
|
|
538
|
+
return result;
|
|
559
539
|
}
|
|
560
540
|
async GetTranslations(langIso) {
|
|
561
541
|
let result = await this.get(this.urls.Translations + '?langIso=' + langIso);
|
|
562
542
|
return result;
|
|
563
543
|
}
|
|
544
|
+
async LandingValidationStartFlow(cameraIsAccessible) {
|
|
545
|
+
let result = await this.post(this.urls.StartFlow, JSON.stringify({ requesId: state.requestId, cameraIsAccessible: cameraIsAccessible }));
|
|
546
|
+
return FlowStatus[result.state];
|
|
547
|
+
}
|
|
548
|
+
async GetNextFlowState() {
|
|
549
|
+
let result = await this.get(this.urls.StartFlow + '?requesId=' + state.requestId);
|
|
550
|
+
return FlowStatus[result.state];
|
|
551
|
+
}
|
|
564
552
|
}
|
|
565
553
|
|
|
566
554
|
class TranslationsController {
|