@ekyc_qoobiss/qbs-ect-cmp 3.6.7 → 3.6.10
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/Stream-1b0beea8.js +5349 -0
- package/dist/cjs/agreement-check_18.cjs.entry.js +763 -6009
- package/dist/cjs/id-double-side.cjs.entry.js +208 -0
- package/dist/cjs/id-single-side.cjs.entry.js +147 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +4 -19
- package/dist/collection/components/common/id-capture/id-capture.js +4 -19
- package/dist/collection/components/common/id-tilt/id-tilt.css +35 -0
- package/dist/collection/components/common/id-tilt/id-tilt.js +194 -0
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +4 -3
- package/dist/collection/components/controls/camera/camera.js +3 -1
- package/dist/collection/components/flow/process-id/process-id.css +0 -0
- package/dist/collection/components/flow/process-id/process-id.js +375 -0
- package/dist/collection/components/identification-component/identification-component.js +2 -5
- package/dist/collection/helpers/Stream.js +10 -8
- package/dist/collection/helpers/store.js +1 -0
- package/dist/collection/libs/IDML5Detector/IDML5Detector.js +12 -12
- package/dist/collection/models/CaptureFlow.js +16 -0
- package/dist/collection/models/FlowSteps.js +1 -0
- package/dist/collection/models/IRecordingCallback.js +1 -0
- package/dist/collection/models/IVerificationMode.js +5 -0
- package/dist/esm/Stream-0935dac1.js +5325 -0
- package/dist/esm/agreement-check_18.entry.js +446 -5692
- package/dist/esm/id-double-side.entry.js +204 -0
- package/dist/esm/id-single-side.entry.js +143 -0
- package/dist/esm/{index-9d69e511.js → index-5d6f9123.js} +1 -1
- package/dist/esm/loader-dots.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/qbs-ect-cmp.js +3 -3
- package/dist/qbs-ect-cmp/{p-4c8e922b.entry.js → p-7c33dd41.entry.js} +1 -1
- package/dist/qbs-ect-cmp/p-933b4d66.entry.js +1 -0
- package/dist/qbs-ect-cmp/{p-06e42b28.js → p-aacd7024.js} +1 -1
- package/dist/qbs-ect-cmp/{p-3083aa5e.entry.js → p-c8a04b87.js} +26 -26
- package/dist/qbs-ect-cmp/p-d95265e0.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-e5c2d08c.entry.js +1 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +0 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
- package/dist/types/components/common/id-tilt/id-tilt.d.ts +26 -0
- package/dist/types/components/controls/camera/camera.d.ts +3 -2
- package/dist/types/components/flow/process-id/process-id.d.ts +28 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/helpers/Stream.d.ts +5 -2
- package/dist/types/libs/IDML5Detector/IDML5Detector.d.ts +4 -3
- package/dist/types/models/CaptureFlow.d.ts +29 -0
- package/dist/types/models/FlowSteps.d.ts +1 -0
- package/dist/types/models/IEctStore.d.ts +1 -0
- package/dist/types/models/IRecordingCallback.d.ts +4 -0
- package/dist/types/models/IVerificationMode.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as s}from"./p-aacd7024.js";import{B as h,F as a,l as e,s as o,c as n,S as r}from"./p-c8a04b87.js";const l=class{constructor(s){i(this,s),this.apiErrorEvent=t(this,"apiError",7),this.recordingResultCount=0,this.showTimeout=void 0,this.showHowTo=void 0,this.idFlow={verificationFinished:!1,photoDone:!1,recordingDone:!1,photoFile:null,recordingFile:null},this.baseComponent=new h(a.CiFront),this.baseComponent.setEventEmitter(this.apiErrorEvent),this.captureRetryCount=0,this.showHowTo=!0}captureErrorDone(){this.idFlow.photoFile=null,this.idFlow.recordingFile=null,this.showTimeout=!1}howToDone(){this.showHowTo=!1}timeElapsed(){this.showTimeout=!0}async captureIdImage(i){let t=i.detail;if(0==t.size)return await this.baseComponent.apiCall.AddLog({message:"Empty id photo",blobData:t},e()),void(this.showTimeout=!0);try{this.idFlow.photoFile=new File([t],"idImage.png",{type:"image/png"}),await this.uploadPhoto()}catch(i){this.apiErrorEvent.emit(i)}}async verificationFinished(i){this.idFlow.verificationFinished=!0,await this.endFlow()}async capturedIdRecording(i){let t=i.detail;if(0==t.size&&0==this.recordingResultCount)return void this.recordingResultCount++;if(0==t.size)return await this.baseComponent.apiCall.AddLog({message:"Empty ID recording",blobData:t},e()),void(this.showTimeout=!0);let s=t.type==r.mp4MimeType.type?r.mp4MimeType:r.webmMimeType;if(o.flowStatus==n.ID)try{this.idFlow.recordingFile=new File([t],"idVideo."+s.extension,{type:s.type}),await this.uploadRecording()}catch(i){this.apiErrorEvent.emit(i)}}async componentDidLoad(){await this.baseComponent.initialize()}async uploadPhoto(){null==this.idFlow.photoFile||this.idFlow.photoDone||(this.idFlow.photoDone=await this.baseComponent.apiCall.UploadFileForRequestB64(o.requestId,"IdFront",this.idFlow.photoFile),this.idFlow.photoDone?await this.endFlow():(this.idFlow.photoFile=null,this.idFlow.recordingFile=null,this.switchCamera(),this.showTimeout=!0))}async uploadRecording(){null==this.idFlow.recordingFile||this.idFlow.recordingDone||(this.idFlow.recordingDone=await this.baseComponent.apiCall.UploadFileForRequestB64(o.requestId,"IdFrontVideo",this.idFlow.recordingFile),this.idFlow.recordingDone?await this.endFlow():(this.idFlow.photoFile=null,this.idFlow.recordingFile=null,this.showTimeout=!0))}async endFlow(){this.idFlow.photoDone&&this.idFlow.recordingDone&&this.idFlow.verificationFinished&&(o.flowStatus=n.LIVENESS)}async disconnectedCallback(){await this.baseComponent.finalize()}switchCamera(){if(1==this.captureRetryCount){let i=o.cameraIds.indexOf(o.cameraId);o.cameraId=i===o.cameraIds.length-1?o.cameraIds[0]:o.cameraIds[i+1],this.captureRetryCount=0}else this.captureRetryCount++}render(){let i=s("capture-error",{type:"ID"}),t=s("id-capture",{id:"idFront"}),h=s("how-to-info",{idSide:"front"});return this.showHowTo?h:this.showTimeout?i:t}};l.style="";export{l as id_single_side}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as s}from"./p-aacd7024.js";import{B as h,F as a,l as e,s as o,c as d,S as r}from"./p-c8a04b87.js";const n=class{constructor(s){i(this,s),this.apiErrorEvent=t(this,"apiError",7),this.recordingResultCount=0,this.showTimeout=void 0,this.showInvalid=void 0,this.showHowTo=void 0,this.front=void 0,this.flow={photoDone:!1,recordingDone:!1,verificationFinished:!1,photoFile:null,photoFileName:"",photoUploadType:"",recordingFile:null,recordingFileName:"",recordingUploadType:""},this.baseComponent=new h(a.CiBack),this.baseComponent.setEventEmitter(this.apiErrorEvent)}componentWillLoad(){this.captureRetryCount=0,this.showHowTo=!0,this.flow.photoFileName="idImage.png",this.flow.recordingFileName="idVideo.",this.flow.photoUploadType="IdFront",this.flow.recordingUploadType="IdFrontVideo",this.front=!0}howToDone(){this.showHowTo=!1}timeElapsed(){this.showTimeout=!0}captureErrorDone(){1==this.showTimeout&&(this.showTimeout=!1),1==this.showInvalid&&(this.flow.photoFileName="idImage.png",this.flow.recordingFileName="idVideo.",this.flow.photoUploadType="IdFront",this.flow.recordingUploadType="IdFrontVideo",this.flow.photoFile=null,this.flow.recordingFile=null,this.flow.photoDone=!1,this.flow.recordingDone=!1,this.front=!0,this.showInvalid=!1)}async captureIdImage(i){let t=i.detail;if(0==t.size)return await this.baseComponent.apiCall.AddLog({message:"Empty id photo",blobData:t},e()),void this.triggerErrorFlow();try{this.flow.photoFile=new File([t],this.flow.photoFileName,{type:"image/png"}),this.uploadPhoto()}catch(i){this.apiErrorEvent.emit(i)}}async captureIdBackImage(i){let t=i.detail;if(0==t.size)return await this.baseComponent.apiCall.AddLog({message:"Empty id photo",blobData:t},e()),void this.triggerErrorFlow();try{this.flow.photoFile=new File([t],this.flow.photoFileName,{type:"image/png"}),this.uploadPhoto()}catch(i){this.apiErrorEvent.emit(i)}}async capturedIdRecording(i){let t=i.detail;if(0==t.size&&0==this.recordingResultCount)return void this.recordingResultCount++;if(0==t.size)return await this.baseComponent.apiCall.AddLog({message:"Empty recording",blobData:t},e()),void this.triggerErrorFlow();this.recordingResultCount=0;let s=t.type==r.mp4MimeType.type?r.mp4MimeType:r.webmMimeType;try{this.flow.recordingFile=new File([t],this.flow.recordingFileName+s.extension,{type:s.type}),this.uploadRecording()}catch(i){o.recordingRetryCount<3?(o.recordingRetryCount++,this.triggerErrorFlow()):this.apiErrorEvent.emit(i)}}async verificationFinished(i){this.flow.verificationFinished=!0,await this.endFlow()}async componentDidLoad(){await this.baseComponent.initialize()}async uploadPhoto(){null==this.flow.photoFile||this.flow.photoDone||(this.flow.photoDone=await this.baseComponent.apiCall.UploadFileForRequestB64(o.requestId,this.flow.photoUploadType,this.flow.photoFile),this.flow.photoDone?await this.endFlow():(this.switchCamera(),this.triggerErrorFlow()))}async uploadRecording(){null==this.flow.recordingFile||this.flow.recordingDone||(this.flow.recordingDone=await this.baseComponent.apiCall.UploadFileForRequestB64(o.requestId,this.flow.recordingUploadType,this.flow.recordingFile),this.flow.recordingDone?await this.endFlow():this.triggerErrorFlow())}triggerErrorFlow(){this.flow.photoFile=null,this.flow.recordingFile=null,this.showInvalid=!0}async endFlow(){if(this.flow.photoDone&&this.flow.recordingDone)return this.front?(this.flow.photoFileName="idBackImage.png",this.flow.recordingFileName="idBackVideo.",this.flow.photoUploadType="IdBack",this.flow.recordingUploadType="IdBackVideo",this.flow.photoFile=null,this.flow.recordingFile=null,this.flow.photoDone=!1,this.flow.recordingDone=!1,this.front=!1,void(this.showHowTo=!0)):void(this.flow.verificationFinished&&(o.recordingRetryCount=0,o.flowStatus=d.LIVENESS))}async disconnectedCallback(){await this.baseComponent.finalize()}switchCamera(){if(1==this.captureRetryCount){let i=o.cameraIds.indexOf(o.cameraId);o.cameraId=i===o.cameraIds.length-1?o.cameraIds[0]:o.cameraIds[i+1],this.captureRetryCount=0}else this.captureRetryCount++}render(){let i=s("capture-error",{type:"ID"}),t=s("id-capture",{id:"idFront"}),h=s("id-back-capture",{id:"idBack"}),a=s("how-to-info",{idSide:this.front?"front":"back"});return this.showHowTo?a:this.showInvalid||this.showTimeout?i:this.front?t:h}};n.style="";export{n as id_double_side}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-aacd7024.js";export{s as setNonce}from"./p-aacd7024.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-933b4d66",[[1,"identification-component",{token:[1537],order_id:[1537],api_url:[1537],env:[1537],redirect_id:[1537],phone_number:[1537],idSide:[32],errorMessage:[32],errorTitle:[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"process-id",{captureStep:[32],showTimeout:[32],showInvalid:[32],flow:[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{showError:[32],showHowTo:[32],selfieFlow:[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{agreementsChecked:[32],termsChecked:[32],openAgreements:[32],openTerms:[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{title:[32],description:[32],buttonDisabled:[32],demoVideo:[32]}],[0,"end-redirect"],[0,"error-end",{message:[1],errorTitle:[1,"error-title"]}],[0,"landing-validation",{warningText:[32],buttonDisabled:[32]}],[0,"mobile-redirect",{infoTextTop:[32],infoTextBottom:[32],contact:[32],invalidValue:[32],waitingMobile:[32],orderStatus:[32],redirectLink:[32],qrCode:[32],prefilledPhone:[32]}],[0,"sms-code-validation",{title:[32],details:[32],buttonText:[32],phoneNumber:[32],code:[32],prefilledPhone:[32],canSend:[32]}],[0,"id-tilt",{videoStarted:[32],cameraSize:[32],captureTaken:[32],verified:[32],titleMesage:[32],showDemo:[32],demoVideo:[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{videoStarted:[32],captureTaken:[32],verified:[32],titleMesage:[32],demoEnded:[32],demoVideo:[32],uploadingLink:[32],captureHeight:[32],captureWidth:[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{agreementType:[1,"agreement-type"],htmlContent:[32],buttonEnabled:[32]}],[0,"id-back-capture",{videoStarted:[32],cameraSize:[32],captureTaken:[32],verified:[32],titleMesage:[32],showDemo:[32],demoVideo:[32]},[[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"id-capture",{videoStarted:[32],cameraSize:[32],captureTaken:[32],verified:[32],titleMesage:[32],showDemo:[32],demoVideo:[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{type:[1],buttonEnabled:[32],buttonText:[32]}],[0,"how-to-info",{idSide:[1,"id-side"],topTitle:[32],subTitle:[32],imagePath:[32],buttonText:[32],buttonEnabled:[32]}],[0,"camera-comp",{modelPath:[1,"model-path"],probabilityThreshold:[2,"probability-threshold"],captureMode:[1,"capture-mode"]}]]],["p-e5c2d08c",[[0,"id-double-side",{showTimeout:[32],showInvalid:[32],showHowTo:[32],front:[32],flow:[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]]]],["p-d95265e0",[[0,"id-single-side",{showTimeout:[32],showHowTo:[32],idFlow:[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]]]],["p-7c33dd41",[[1,"loader-dots"]]]],e)));
|
|
@@ -13,7 +13,6 @@ export declare class IdBackCapture {
|
|
|
13
13
|
private showDemo;
|
|
14
14
|
private demoVideo;
|
|
15
15
|
constructor();
|
|
16
|
-
eventChangeTitle(event: any): Promise<void>;
|
|
17
16
|
eventVideoStarted(event: any): void;
|
|
18
17
|
componentWillLoad(): Promise<void>;
|
|
19
18
|
componentDidLoad(): Promise<void>;
|
|
@@ -13,7 +13,6 @@ export declare class IdCapture {
|
|
|
13
13
|
apiErrorEvent: EventEmitter<any>;
|
|
14
14
|
private cameras;
|
|
15
15
|
constructor();
|
|
16
|
-
eventChangeTitle(event: any): Promise<void>;
|
|
17
16
|
eventVideoStarted(event: any): void;
|
|
18
17
|
componentWillLoad(): Promise<void>;
|
|
19
18
|
componentDidLoad(): Promise<void>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
export declare class IdTilt {
|
|
3
|
+
private baseComponent;
|
|
4
|
+
component: HTMLElement;
|
|
5
|
+
private videoStarted;
|
|
6
|
+
private cameraSize;
|
|
7
|
+
private captureTaken;
|
|
8
|
+
private verified;
|
|
9
|
+
private titleMesage;
|
|
10
|
+
private showDemo;
|
|
11
|
+
private demoVideo;
|
|
12
|
+
eventPhotoCapture: EventEmitter;
|
|
13
|
+
apiErrorEvent: EventEmitter<any>;
|
|
14
|
+
private cameras;
|
|
15
|
+
constructor();
|
|
16
|
+
eventVideoStarted(event: any): void;
|
|
17
|
+
componentWillLoad(): Promise<void>;
|
|
18
|
+
componentDidLoad(): Promise<void>;
|
|
19
|
+
openCamera(): Promise<void>;
|
|
20
|
+
closeCamera(): void;
|
|
21
|
+
disconnectedCallback(): void;
|
|
22
|
+
takePhoto(): Promise<void>;
|
|
23
|
+
verificationFinished(): Promise<void>;
|
|
24
|
+
photoIsReady: (photos: any) => void;
|
|
25
|
+
render(): any;
|
|
26
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
2
|
import { IDPose } from '../../../libs/IDML5Detector/IDPose';
|
|
3
3
|
import { FacePose } from '../../../libs/FaceML5Detector/FacePose';
|
|
4
|
+
import { RecordingCallback } from '../../../models/IRecordingCallback';
|
|
4
5
|
export declare class Camera {
|
|
5
6
|
component: HTMLElement;
|
|
6
7
|
modelPath: string;
|
|
@@ -21,8 +22,8 @@ export declare class Camera {
|
|
|
21
22
|
render(): any;
|
|
22
23
|
callbackErrors: (error: Error, isError: boolean) => void;
|
|
23
24
|
callbackAutoCapturing: () => void;
|
|
24
|
-
callbackSelfieRecordingReady: (recording:
|
|
25
|
-
callbackIdRecordingReady: (recording:
|
|
25
|
+
callbackSelfieRecordingReady: (recording: RecordingCallback) => void;
|
|
26
|
+
callbackIdRecordingReady: (recording: RecordingCallback) => void;
|
|
26
27
|
callbackTimeElapsed: () => void;
|
|
27
28
|
callbackChangeTitle: (message: FacePose | IDPose) => void;
|
|
28
29
|
callbackVideoStarted: () => void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
export declare class ProcessId {
|
|
3
|
+
private captureRetryCount;
|
|
4
|
+
private baseComponent;
|
|
5
|
+
private recordingResultCount;
|
|
6
|
+
private captureStep;
|
|
7
|
+
private showTimeout;
|
|
8
|
+
private showInvalid;
|
|
9
|
+
private flow;
|
|
10
|
+
apiErrorEvent: EventEmitter<any>;
|
|
11
|
+
constructor();
|
|
12
|
+
componentWillLoad(): void;
|
|
13
|
+
howToDone(): void;
|
|
14
|
+
timeElapsed(): void;
|
|
15
|
+
captureErrorDone(): void;
|
|
16
|
+
captureIdImage(event: any): Promise<void>;
|
|
17
|
+
captureIdBackImage(event: any): Promise<void>;
|
|
18
|
+
capturedIdRecording(event: any): Promise<void>;
|
|
19
|
+
getRecordingFile(): Promise<boolean>;
|
|
20
|
+
componentDidLoad(): Promise<void>;
|
|
21
|
+
uploadPhotos(uploadType: string, photoFile: File): Promise<boolean>;
|
|
22
|
+
uploadRecording(uploadType: string, recordingFile: File): Promise<boolean>;
|
|
23
|
+
private triggerErrorFlow;
|
|
24
|
+
endFlow(): Promise<void>;
|
|
25
|
+
disconnectedCallback(): Promise<void>;
|
|
26
|
+
switchCamera(): void;
|
|
27
|
+
render(): any;
|
|
28
|
+
}
|
|
@@ -38,6 +38,8 @@ export namespace Components {
|
|
|
38
38
|
}
|
|
39
39
|
interface IdSingleSide {
|
|
40
40
|
}
|
|
41
|
+
interface IdTilt {
|
|
42
|
+
}
|
|
41
43
|
interface IdentificationComponent {
|
|
42
44
|
"api_url": string;
|
|
43
45
|
"env": string;
|
|
@@ -52,6 +54,8 @@ export namespace Components {
|
|
|
52
54
|
}
|
|
53
55
|
interface MobileRedirect {
|
|
54
56
|
}
|
|
57
|
+
interface ProcessId {
|
|
58
|
+
}
|
|
55
59
|
interface SelfieCapture {
|
|
56
60
|
}
|
|
57
61
|
interface SmsCodeValidation {
|
|
@@ -103,6 +107,10 @@ export interface IdSingleSideCustomEvent<T> extends CustomEvent<T> {
|
|
|
103
107
|
detail: T;
|
|
104
108
|
target: HTMLIdSingleSideElement;
|
|
105
109
|
}
|
|
110
|
+
export interface IdTiltCustomEvent<T> extends CustomEvent<T> {
|
|
111
|
+
detail: T;
|
|
112
|
+
target: HTMLIdTiltElement;
|
|
113
|
+
}
|
|
106
114
|
export interface LandingValidationCustomEvent<T> extends CustomEvent<T> {
|
|
107
115
|
detail: T;
|
|
108
116
|
target: HTMLLandingValidationElement;
|
|
@@ -111,6 +119,10 @@ export interface MobileRedirectCustomEvent<T> extends CustomEvent<T> {
|
|
|
111
119
|
detail: T;
|
|
112
120
|
target: HTMLMobileRedirectElement;
|
|
113
121
|
}
|
|
122
|
+
export interface ProcessIdCustomEvent<T> extends CustomEvent<T> {
|
|
123
|
+
detail: T;
|
|
124
|
+
target: HTMLProcessIdElement;
|
|
125
|
+
}
|
|
114
126
|
export interface SelfieCaptureCustomEvent<T> extends CustomEvent<T> {
|
|
115
127
|
detail: T;
|
|
116
128
|
target: HTMLSelfieCaptureElement;
|
|
@@ -196,6 +208,12 @@ declare global {
|
|
|
196
208
|
prototype: HTMLIdSingleSideElement;
|
|
197
209
|
new (): HTMLIdSingleSideElement;
|
|
198
210
|
};
|
|
211
|
+
interface HTMLIdTiltElement extends Components.IdTilt, HTMLStencilElement {
|
|
212
|
+
}
|
|
213
|
+
var HTMLIdTiltElement: {
|
|
214
|
+
prototype: HTMLIdTiltElement;
|
|
215
|
+
new (): HTMLIdTiltElement;
|
|
216
|
+
};
|
|
199
217
|
interface HTMLIdentificationComponentElement extends Components.IdentificationComponent, HTMLStencilElement {
|
|
200
218
|
}
|
|
201
219
|
var HTMLIdentificationComponentElement: {
|
|
@@ -220,6 +238,12 @@ declare global {
|
|
|
220
238
|
prototype: HTMLMobileRedirectElement;
|
|
221
239
|
new (): HTMLMobileRedirectElement;
|
|
222
240
|
};
|
|
241
|
+
interface HTMLProcessIdElement extends Components.ProcessId, HTMLStencilElement {
|
|
242
|
+
}
|
|
243
|
+
var HTMLProcessIdElement: {
|
|
244
|
+
prototype: HTMLProcessIdElement;
|
|
245
|
+
new (): HTMLProcessIdElement;
|
|
246
|
+
};
|
|
223
247
|
interface HTMLSelfieCaptureElement extends Components.SelfieCapture, HTMLStencilElement {
|
|
224
248
|
}
|
|
225
249
|
var HTMLSelfieCaptureElement: {
|
|
@@ -251,10 +275,12 @@ declare global {
|
|
|
251
275
|
"id-capture": HTMLIdCaptureElement;
|
|
252
276
|
"id-double-side": HTMLIdDoubleSideElement;
|
|
253
277
|
"id-single-side": HTMLIdSingleSideElement;
|
|
278
|
+
"id-tilt": HTMLIdTiltElement;
|
|
254
279
|
"identification-component": HTMLIdentificationComponentElement;
|
|
255
280
|
"landing-validation": HTMLLandingValidationElement;
|
|
256
281
|
"loader-dots": HTMLLoaderDotsElement;
|
|
257
282
|
"mobile-redirect": HTMLMobileRedirectElement;
|
|
283
|
+
"process-id": HTMLProcessIdElement;
|
|
258
284
|
"selfie-capture": HTMLSelfieCaptureElement;
|
|
259
285
|
"sms-code-validation": HTMLSmsCodeValidationElement;
|
|
260
286
|
"user-liveness": HTMLUserLivenessElement;
|
|
@@ -316,6 +342,10 @@ declare namespace LocalJSX {
|
|
|
316
342
|
interface IdSingleSide {
|
|
317
343
|
"onApiError"?: (event: IdSingleSideCustomEvent<any>) => void;
|
|
318
344
|
}
|
|
345
|
+
interface IdTilt {
|
|
346
|
+
"onApiError"?: (event: IdTiltCustomEvent<any>) => void;
|
|
347
|
+
"onPhotoIdCapture"?: (event: IdTiltCustomEvent<any>) => void;
|
|
348
|
+
}
|
|
319
349
|
interface IdentificationComponent {
|
|
320
350
|
"api_url"?: string;
|
|
321
351
|
"env"?: string;
|
|
@@ -332,6 +362,9 @@ declare namespace LocalJSX {
|
|
|
332
362
|
interface MobileRedirect {
|
|
333
363
|
"onApiError"?: (event: MobileRedirectCustomEvent<any>) => void;
|
|
334
364
|
}
|
|
365
|
+
interface ProcessId {
|
|
366
|
+
"onApiError"?: (event: ProcessIdCustomEvent<any>) => void;
|
|
367
|
+
}
|
|
335
368
|
interface SelfieCapture {
|
|
336
369
|
"onApiError"?: (event: SelfieCaptureCustomEvent<any>) => void;
|
|
337
370
|
"onPhotoSelfieCapture"?: (event: SelfieCaptureCustomEvent<any>) => void;
|
|
@@ -355,10 +388,12 @@ declare namespace LocalJSX {
|
|
|
355
388
|
"id-capture": IdCapture;
|
|
356
389
|
"id-double-side": IdDoubleSide;
|
|
357
390
|
"id-single-side": IdSingleSide;
|
|
391
|
+
"id-tilt": IdTilt;
|
|
358
392
|
"identification-component": IdentificationComponent;
|
|
359
393
|
"landing-validation": LandingValidation;
|
|
360
394
|
"loader-dots": LoaderDots;
|
|
361
395
|
"mobile-redirect": MobileRedirect;
|
|
396
|
+
"process-id": ProcessId;
|
|
362
397
|
"selfie-capture": SelfieCapture;
|
|
363
398
|
"sms-code-validation": SmsCodeValidation;
|
|
364
399
|
"user-liveness": UserLiveness;
|
|
@@ -380,10 +415,12 @@ declare module "@stencil/core" {
|
|
|
380
415
|
"id-capture": LocalJSX.IdCapture & JSXBase.HTMLAttributes<HTMLIdCaptureElement>;
|
|
381
416
|
"id-double-side": LocalJSX.IdDoubleSide & JSXBase.HTMLAttributes<HTMLIdDoubleSideElement>;
|
|
382
417
|
"id-single-side": LocalJSX.IdSingleSide & JSXBase.HTMLAttributes<HTMLIdSingleSideElement>;
|
|
418
|
+
"id-tilt": LocalJSX.IdTilt & JSXBase.HTMLAttributes<HTMLIdTiltElement>;
|
|
383
419
|
"identification-component": LocalJSX.IdentificationComponent & JSXBase.HTMLAttributes<HTMLIdentificationComponentElement>;
|
|
384
420
|
"landing-validation": LocalJSX.LandingValidation & JSXBase.HTMLAttributes<HTMLLandingValidationElement>;
|
|
385
421
|
"loader-dots": LocalJSX.LoaderDots & JSXBase.HTMLAttributes<HTMLLoaderDotsElement>;
|
|
386
422
|
"mobile-redirect": LocalJSX.MobileRedirect & JSXBase.HTMLAttributes<HTMLMobileRedirectElement>;
|
|
423
|
+
"process-id": LocalJSX.ProcessId & JSXBase.HTMLAttributes<HTMLProcessIdElement>;
|
|
387
424
|
"selfie-capture": LocalJSX.SelfieCapture & JSXBase.HTMLAttributes<HTMLSelfieCaptureElement>;
|
|
388
425
|
"sms-code-validation": LocalJSX.SmsCodeValidation & JSXBase.HTMLAttributes<HTMLSmsCodeValidationElement>;
|
|
389
426
|
"user-liveness": LocalJSX.UserLiveness & JSXBase.HTMLAttributes<HTMLUserLivenessElement>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { FacePose } from '../libs/FaceML5Detector/FacePose';
|
|
2
2
|
import { IDPose } from '../libs/IDML5Detector/IDPose';
|
|
3
|
+
import { RecordingCallback } from '../models/IRecordingCallback';
|
|
4
|
+
import { VerificationMode } from '../models/IVerificationMode';
|
|
3
5
|
export declare class Stream {
|
|
4
6
|
static mp4MimeType: {
|
|
5
7
|
type: string;
|
|
@@ -23,6 +25,7 @@ export declare class Stream {
|
|
|
23
25
|
private idDetection;
|
|
24
26
|
private recordedChunks;
|
|
25
27
|
private videoSize;
|
|
28
|
+
private verificationMode;
|
|
26
29
|
private readonly idML5Detector;
|
|
27
30
|
private readonly faceML5Detector;
|
|
28
31
|
private callbackErrors;
|
|
@@ -38,11 +41,11 @@ export declare class Stream {
|
|
|
38
41
|
setCallbackVideoStarted(fun: () => void): void;
|
|
39
42
|
setCallbackErrors(fun: (error: Error, isError: boolean) => void): void;
|
|
40
43
|
setCallbackAutoCapturing(fun: () => void): void;
|
|
41
|
-
setCallbackRecordingReady(fun: (recording:
|
|
44
|
+
setCallbackRecordingReady(fun: (recording: RecordingCallback) => void): void;
|
|
42
45
|
setCallbackTimeElapsed(fun: () => void): void;
|
|
43
46
|
setVerificationFinished(fun: () => void): void;
|
|
44
47
|
private constructor();
|
|
45
|
-
static getInstance(): Stream;
|
|
48
|
+
static getInstance(mode: VerificationMode): Stream;
|
|
46
49
|
autoCapturing(): void;
|
|
47
50
|
timeElapsed(): void;
|
|
48
51
|
verificationReady(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Stream } from '../../helpers/Stream';
|
|
2
|
+
import { VerificationMode } from '../../models/IVerificationMode';
|
|
2
3
|
export declare class IDML5Detector {
|
|
3
4
|
static instance: IDML5Detector;
|
|
4
5
|
private MAX_DETECTION;
|
|
@@ -8,13 +9,13 @@ export declare class IDML5Detector {
|
|
|
8
9
|
private canvasElement;
|
|
9
10
|
private stream;
|
|
10
11
|
private ml5;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
12
|
+
private targetedLabel;
|
|
13
|
+
private checked;
|
|
13
14
|
private start;
|
|
14
15
|
static getInstance(stream: Stream, isMobile: boolean): IDML5Detector;
|
|
15
16
|
constructor(stream: Stream, _isMobile: boolean);
|
|
16
17
|
updateHtmlElements(videoElement: HTMLVideoElement, canvasElement: HTMLCanvasElement, _component: HTMLElement): void;
|
|
17
|
-
initDetector(): void;
|
|
18
|
+
initDetector(mode: VerificationMode): void;
|
|
18
19
|
private classifyVideo;
|
|
19
20
|
private gotResults;
|
|
20
21
|
private drawFrame;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface CaptureFlow {
|
|
2
|
+
front: CaptureSide;
|
|
3
|
+
back: CaptureSide;
|
|
4
|
+
tilt: CaptureSide;
|
|
5
|
+
recordingData: any[];
|
|
6
|
+
mimeType: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CaptureSide {
|
|
9
|
+
photoDone: boolean;
|
|
10
|
+
recordingDone: boolean;
|
|
11
|
+
file: File | null;
|
|
12
|
+
recoding: any[];
|
|
13
|
+
fileName: string;
|
|
14
|
+
uploadType: CaptureUploadTypes;
|
|
15
|
+
}
|
|
16
|
+
export declare enum CaptureUploadTypes {
|
|
17
|
+
IdFront = "IdFront",
|
|
18
|
+
IdBack = "IdBack",
|
|
19
|
+
IdFrontVideo = "IdFrontVideo",
|
|
20
|
+
None = "None"
|
|
21
|
+
}
|
|
22
|
+
export declare enum CaptureFlowStatus {
|
|
23
|
+
HowToFront = 0,
|
|
24
|
+
IdFront = 1,
|
|
25
|
+
HowToBack = 2,
|
|
26
|
+
IdBack = 3,
|
|
27
|
+
Tilt = 4,
|
|
28
|
+
End = 5
|
|
29
|
+
}
|