@ekyc_qoobiss/qbs-ect-cmp 3.6.40 → 3.6.42
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} +248 -821
- 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 -3
- 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 +46 -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/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} +248 -819
- 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-df2ea91b.entry.js → p-f62c1796.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/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 +3 -6
- package/dist/types/components/identification-component/identification-component.d.ts +1 -2
- package/dist/types/components.d.ts +18 -62
- package/dist/types/helpers/ApiCall.d.ts +9 -3
- 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
|
@@ -205,16 +205,21 @@ const createStore = (defaultState, shouldUpdate) => {
|
|
|
205
205
|
exports.FlowStatus = void 0;
|
|
206
206
|
(function (FlowStatus) {
|
|
207
207
|
FlowStatus[FlowStatus["LANDING"] = 0] = "LANDING";
|
|
208
|
-
FlowStatus[FlowStatus["
|
|
209
|
-
FlowStatus[FlowStatus["
|
|
210
|
-
FlowStatus[FlowStatus["
|
|
211
|
-
FlowStatus[FlowStatus["
|
|
212
|
-
FlowStatus[FlowStatus["
|
|
213
|
-
FlowStatus[FlowStatus["
|
|
214
|
-
FlowStatus[FlowStatus["
|
|
215
|
-
FlowStatus[FlowStatus["
|
|
216
|
-
FlowStatus[FlowStatus["
|
|
217
|
-
FlowStatus[FlowStatus["
|
|
208
|
+
FlowStatus[FlowStatus["MOBILE"] = 1] = "MOBILE";
|
|
209
|
+
FlowStatus[FlowStatus["AGREEMENT"] = 2] = "AGREEMENT";
|
|
210
|
+
FlowStatus[FlowStatus["PHONE"] = 3] = "PHONE";
|
|
211
|
+
FlowStatus[FlowStatus["CODE"] = 4] = "CODE";
|
|
212
|
+
FlowStatus[FlowStatus["CODEERROR"] = 5] = "CODEERROR";
|
|
213
|
+
FlowStatus[FlowStatus["IDFRONT"] = 6] = "IDFRONT";
|
|
214
|
+
FlowStatus[FlowStatus["IDBACK"] = 7] = "IDBACK";
|
|
215
|
+
FlowStatus[FlowStatus["IDTILT"] = 8] = "IDTILT";
|
|
216
|
+
FlowStatus[FlowStatus["LIVENESS"] = 9] = "LIVENESS";
|
|
217
|
+
FlowStatus[FlowStatus["LIVENESSGESTURE"] = 10] = "LIVENESSGESTURE";
|
|
218
|
+
FlowStatus[FlowStatus["COMPLETE"] = 11] = "COMPLETE";
|
|
219
|
+
FlowStatus[FlowStatus["ERROREND"] = 12] = "ERROREND";
|
|
220
|
+
FlowStatus[FlowStatus["CAMERAERROR"] = 13] = "CAMERAERROR";
|
|
221
|
+
FlowStatus[FlowStatus["ABORTED"] = 14] = "ABORTED";
|
|
222
|
+
FlowStatus[FlowStatus["NONE"] = 15] = "NONE";
|
|
218
223
|
})(exports.FlowStatus || (exports.FlowStatus = {}));
|
|
219
224
|
|
|
220
225
|
class IdCaptureValues {
|
|
@@ -263,6 +268,8 @@ class ApiUrls {
|
|
|
263
268
|
this.AddStep = this.uriEnv + 'validation/logs/step';
|
|
264
269
|
this.AbortRequest = this.uriEnv + 'validation/identity/abort';
|
|
265
270
|
this.Translations = this.uriEnv + 'validation/translations/get';
|
|
271
|
+
this.StartFlow = this.uriEnv + 'flowstate/startflow';
|
|
272
|
+
this.NextFlowState = this.uriEnv + 'flowstate/getnextstate';
|
|
266
273
|
}
|
|
267
274
|
}
|
|
268
275
|
|
|
@@ -272,15 +279,9 @@ const { state, onChange } = createStore({
|
|
|
272
279
|
debug: false,
|
|
273
280
|
requestId: '',
|
|
274
281
|
redirectId: '',
|
|
275
|
-
initialised: false,
|
|
276
282
|
token: '',
|
|
277
283
|
cameraIds: [],
|
|
278
284
|
cameraId: '',
|
|
279
|
-
hasIdBack: false,
|
|
280
|
-
hasSelfieGesture: false,
|
|
281
|
-
hasIdTilt: false,
|
|
282
|
-
agreementsValidation: true,
|
|
283
|
-
phoneValidation: true,
|
|
284
285
|
phoneNumber: '',
|
|
285
286
|
apiBaseUrl: 'https://apiro.id-kyc.com',
|
|
286
287
|
device: null,
|
|
@@ -297,18 +298,6 @@ onChange('token', value => {
|
|
|
297
298
|
});
|
|
298
299
|
onChange('requestId', value => {
|
|
299
300
|
sessionStorage.setItem(SessionKeys.RequestIdKey, value);
|
|
300
|
-
});
|
|
301
|
-
onChange('initialised', value => {
|
|
302
|
-
sessionStorage.setItem(SessionKeys.InitialisedKey, String(value));
|
|
303
|
-
});
|
|
304
|
-
onChange('hasIdBack', value => {
|
|
305
|
-
sessionStorage.setItem(SessionKeys.HasIdBackKey, String(value));
|
|
306
|
-
});
|
|
307
|
-
onChange('agreementsValidation', value => {
|
|
308
|
-
sessionStorage.setItem(SessionKeys.AgreementValidationKey, String(value));
|
|
309
|
-
});
|
|
310
|
-
onChange('phoneValidation', value => {
|
|
311
|
-
sessionStorage.setItem(SessionKeys.PhoneValidationKey, String(value));
|
|
312
301
|
});
|
|
313
302
|
|
|
314
303
|
exports.FlowSteps = void 0;
|
|
@@ -473,12 +462,12 @@ class ApiCall {
|
|
|
473
462
|
async SendOTPCode(requestId, phoneNumber) {
|
|
474
463
|
let data = { requestId: requestId, phone: phoneNumber };
|
|
475
464
|
let jsonResp = await this.post(this.urls.OtpSend, JSON.stringify(data));
|
|
476
|
-
return jsonResp
|
|
465
|
+
return jsonResp;
|
|
477
466
|
}
|
|
478
467
|
async CheckOTPCode(requestId, otpCode) {
|
|
479
468
|
let data = { requestId: requestId, otp: otpCode };
|
|
480
469
|
let jsonResp = await this.post(this.urls.OtpCheck, JSON.stringify(data));
|
|
481
|
-
return jsonResp
|
|
470
|
+
return jsonResp;
|
|
482
471
|
}
|
|
483
472
|
async AddIdentificationRequest(deviceInfo, version) {
|
|
484
473
|
if (state.debug)
|
|
@@ -494,12 +483,8 @@ class ApiCall {
|
|
|
494
483
|
if (state.requestId == '') {
|
|
495
484
|
state.requestId = jsonResp.requestId;
|
|
496
485
|
}
|
|
497
|
-
state.hasIdBack = jsonResp.hasIdBack;
|
|
498
|
-
state.hasIdTilt = jsonResp.hasIdTilt;
|
|
499
|
-
state.hasSelfieGesture = jsonResp.hasSelfieGesture;
|
|
500
|
-
state.agreementsValidation = jsonResp.agreementsValidation;
|
|
501
|
-
state.phoneValidation = jsonResp.phoneValidation;
|
|
502
486
|
state.phoneNumber = jsonResp.phoneNumber;
|
|
487
|
+
state.flowStatus = exports.FlowStatus[jsonResp.status];
|
|
503
488
|
return true;
|
|
504
489
|
}
|
|
505
490
|
async UploadFileForRequestB64(requestId, type, file) {
|
|
@@ -509,13 +494,8 @@ class ApiCall {
|
|
|
509
494
|
data: await this.toBase64(file),
|
|
510
495
|
};
|
|
511
496
|
let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
if (state.hasIdBack && type == 'IdBack') {
|
|
516
|
-
return respJson.isValid;
|
|
517
|
-
}
|
|
518
|
-
if (type == 'Selfie') {
|
|
497
|
+
state.flowStatus = exports.FlowStatus[respJson.state];
|
|
498
|
+
if (type in ['IdFront', 'IdBack', 'Selfie']) {
|
|
519
499
|
return respJson.isValid;
|
|
520
500
|
}
|
|
521
501
|
return true;
|
|
@@ -557,12 +537,20 @@ class ApiCall {
|
|
|
557
537
|
}
|
|
558
538
|
async AbortRequest() {
|
|
559
539
|
let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: state.requestId }));
|
|
560
|
-
return result
|
|
540
|
+
return result;
|
|
561
541
|
}
|
|
562
542
|
async GetTranslations(langIso) {
|
|
563
543
|
let result = await this.get(this.urls.Translations + '?langIso=' + langIso);
|
|
564
544
|
return result;
|
|
565
545
|
}
|
|
546
|
+
async LandingValidationStartFlow(cameraIsAccessible) {
|
|
547
|
+
let result = await this.post(this.urls.StartFlow, JSON.stringify({ requesId: state.requestId, cameraIsAccessible: cameraIsAccessible }));
|
|
548
|
+
return exports.FlowStatus[result.state];
|
|
549
|
+
}
|
|
550
|
+
async GetNextFlowState() {
|
|
551
|
+
let result = await this.get(this.urls.StartFlow + '?requesId=' + state.requestId);
|
|
552
|
+
return exports.FlowStatus[result.state];
|
|
553
|
+
}
|
|
566
554
|
}
|
|
567
555
|
|
|
568
556
|
class TranslationsController {
|