@ekyc_qoobiss/qbs-ect-cmp 3.2.1 → 3.2.2

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.
Files changed (60) hide show
  1. package/dist/cjs/agreement-check_18.cjs.entry.js +379 -267
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
  4. package/dist/collection/components/base-component.js +48 -0
  5. package/dist/collection/components/common/camera-error/camera-error.js +9 -36
  6. package/dist/collection/components/common/id-back-capture/id-back-capture.js +2 -27
  7. package/dist/collection/components/common/id-capture/id-capture.js +2 -27
  8. package/dist/collection/components/common/selfie-capture/selfie-capture.js +4 -28
  9. package/dist/collection/components/controls/camera/camera.js +3 -23
  10. package/dist/collection/components/flow/agreement-info/agreement-info.js +6 -9
  11. package/dist/collection/components/flow/end-redirect/end-redirect.js +4 -9
  12. package/dist/collection/components/flow/id-double-side/id-double-side.js +31 -51
  13. package/dist/collection/components/flow/id-single-side/id-single-side.js +14 -42
  14. package/dist/collection/components/flow/landing-validation/landing-validation.js +19 -40
  15. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +7 -10
  16. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +12 -15
  17. package/dist/collection/components/flow/user-liveness/user-liveness.js +29 -49
  18. package/dist/collection/components/identification-component/identification-component.js +14 -15
  19. package/dist/collection/helpers/ApiCall.js +3 -3
  20. package/dist/collection/helpers/Cameras.js +3 -2
  21. package/dist/collection/helpers/DeviceDetection.js +83 -0
  22. package/dist/collection/helpers/Events.js +9 -0
  23. package/dist/collection/helpers/Stream.js +9 -8
  24. package/dist/collection/helpers/index.js +0 -33
  25. package/dist/collection/helpers/store.js +2 -0
  26. package/dist/collection/models/FlowSteps.js +19 -13
  27. package/dist/collection/models/IDevice.js +22 -1
  28. package/dist/collection/models/IEctStore.js +1 -0
  29. package/dist/esm/agreement-check_18.entry.js +379 -267
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm/qbs-ect-cmp.js +1 -1
  32. package/dist/qbs-ect-cmp/{p-92eaaff9.entry.js → p-29f81591.entry.js} +2 -2
  33. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  34. package/dist/types/components/base-component.d.ts +14 -0
  35. package/dist/types/components/common/camera-error/camera-error.d.ts +1 -3
  36. package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +0 -2
  37. package/dist/types/components/common/id-capture/id-capture.d.ts +0 -2
  38. package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -2
  39. package/dist/types/components/controls/camera/camera.d.ts +0 -2
  40. package/dist/types/components/flow/agreement-info/agreement-info.d.ts +3 -3
  41. package/dist/types/components/flow/end-redirect/end-redirect.d.ts +1 -1
  42. package/dist/types/components/flow/id-double-side/id-double-side.d.ts +4 -5
  43. package/dist/types/components/flow/id-single-side/id-single-side.d.ts +3 -5
  44. package/dist/types/components/flow/landing-validation/landing-validation.d.ts +2 -3
  45. package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +1 -1
  46. package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +2 -2
  47. package/dist/types/components/flow/user-liveness/user-liveness.d.ts +3 -4
  48. package/dist/types/components/identification-component/identification-component.d.ts +1 -2
  49. package/dist/types/components.d.ts +0 -19
  50. package/dist/types/helpers/ApiCall.d.ts +4 -4
  51. package/dist/types/helpers/Cameras.d.ts +4 -4
  52. package/dist/types/helpers/DeviceDetection.d.ts +18 -0
  53. package/dist/types/helpers/Events.d.ts +2 -0
  54. package/dist/types/helpers/Stream.d.ts +1 -3
  55. package/dist/types/helpers/index.d.ts +0 -2
  56. package/dist/types/helpers/store.d.ts +2 -17
  57. package/dist/types/models/FlowSteps.d.ts +18 -13
  58. package/dist/types/models/IDevice.d.ts +32 -9
  59. package/dist/types/models/IEctStore.d.ts +20 -0
  60. package/package.json +1 -1
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-06e42b28.js";export{s as setNonce}from"./p-06e42b28.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-4c8e922b",[[1,"loader-dots"]]],["p-92eaaff9",[[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,"id-double-side",{device:[16],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"]]],[0,"id-single-side",{device:[16],showTimeout:[32],showHowTo:[32],idFlow:[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{device:[16],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",{device:[16],title:[32],description:[32],buttonDisabled:[32],demoVideo:[32]}],[0,"end-redirect"],[0,"error-end",{message:[1],errorTitle:[1,"error-title"]}],[0,"landing-validation",{device:[16],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-back-capture",{device:[16],videoStarted:[32],cameraSize:[32],captureTaken:[32],verified:[32],titleMesage:[32],showDemo:[32],demoVideo:[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{device:[16],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-capture",{device:[16],videoStarted:[32],cameraSize:[32],captureTaken:[32],verified:[32],titleMesage:[32],showDemo:[32],demoVideo:[32]},[[0,"changeTitle","eventChangeTitle"],[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"],device:[16],probabilityThreshold:[2,"probability-threshold"],captureMode:[1,"capture-mode"]}]]]],e)));
1
+ import{p as e,b as t}from"./p-06e42b28.js";export{s as setNonce}from"./p-06e42b28.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-4c8e922b",[[1,"loader-dots"]]],["p-29f81591",[[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,"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"]]],[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"]]],[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-back-capture",{videoStarted:[32],cameraSize:[32],captureTaken:[32],verified:[32],titleMesage:[32],showDemo:[32],demoVideo:[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[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-capture",{videoStarted:[32],cameraSize:[32],captureTaken:[32],verified:[32],titleMesage:[32],showDemo:[32],demoVideo:[32]},[[0,"changeTitle","eventChangeTitle"],[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"]}]]]],e)));
@@ -0,0 +1,14 @@
1
+ import { EventEmitter } from '../stencil-public-runtime';
2
+ import { ApiCall } from '../helpers/ApiCall';
3
+ import { FlowSteps } from '../models/FlowSteps';
4
+ export declare class BaseComponent {
5
+ apiCall: ApiCall;
6
+ protected flowStep: FlowSteps;
7
+ private apiErrorEvent;
8
+ private processError;
9
+ constructor(step: FlowSteps | undefined);
10
+ setEventEmitter(event: EventEmitter<any>): void;
11
+ setErrorCallback(callback: (data: any, zone: any) => void): void;
12
+ initialize(): Promise<void>;
13
+ finalize(): Promise<void>;
14
+ }
@@ -1,13 +1,11 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { Device } from '../../../models/IDevice';
3
2
  export declare class CameraError {
4
- device: Device;
5
3
  private title;
6
4
  private description;
7
5
  private buttonDisabled;
8
6
  private demoVideo;
9
7
  private buttonText;
10
- private apiCall;
8
+ private baseComponent;
11
9
  apiErrorEvent: EventEmitter<any>;
12
10
  constructor();
13
11
  componentWillLoad(): Promise<void>;
@@ -1,8 +1,6 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { Device } from '../../../models/IDevice';
3
2
  export declare class IdBackCapture {
4
3
  component: HTMLElement;
5
- device: Device;
6
4
  private videoStarted;
7
5
  private cameraSize;
8
6
  private captureTaken;
@@ -1,8 +1,6 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { Device } from '../../../models/IDevice';
3
2
  export declare class IdCapture {
4
3
  component: HTMLElement;
5
- device: Device;
6
4
  private videoStarted;
7
5
  private cameraSize;
8
6
  private captureTaken;
@@ -1,8 +1,6 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { Device } from '../../../models/IDevice';
3
2
  export declare class SelfieCapture {
4
3
  component: HTMLElement;
5
- device: Device;
6
4
  private videoStarted;
7
5
  private captureTaken;
8
6
  private verified;
@@ -1,11 +1,9 @@
1
- import { Device } from '../../../models/IDevice';
2
1
  import { EventEmitter } from '../../../stencil-public-runtime';
3
2
  import { IDPose } from '../../../libs/IDML5Detector/IDPose';
4
3
  import { FacePose } from '../../../libs/FaceML5Detector/FacePose';
5
4
  export declare class Camera {
6
5
  component: HTMLElement;
7
6
  modelPath: string;
8
- device: Device;
9
7
  probabilityThreshold: number;
10
8
  captureMode: string;
11
9
  private cameraVideo;
@@ -4,12 +4,12 @@ export declare class AgreementInfo {
4
4
  termsChecked: boolean;
5
5
  openAgreements: boolean;
6
6
  openTerms: boolean;
7
- private apiCall;
8
- constructor();
7
+ private baseComponent;
9
8
  apiErrorEvent: EventEmitter<any>;
9
+ constructor();
10
10
  componentDidLoad(): Promise<void>;
11
11
  componentWillLoad(): void;
12
- buttonClick(): void;
12
+ buttonClick(): Promise<void>;
13
13
  agreementAcceptanceEmitted(data: any): void;
14
14
  agreementsClicked(): void;
15
15
  termsClicked(): void;
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class EndRedirect {
3
- private apiCall;
3
+ private baseComponent;
4
4
  apiErrorEvent: EventEmitter<any>;
5
5
  constructor();
6
6
  componentDidLoad(): Promise<void>;
@@ -1,17 +1,15 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { Device } from '../../../models/IDevice';
3
2
  export declare class IdDoubleSide {
4
- device: Device;
5
3
  private captureRetryCount;
6
- private apiCall;
4
+ private baseComponent;
7
5
  private showTimeout;
8
6
  private showInvalid;
9
7
  private showHowTo;
10
8
  private front;
11
9
  private flow;
10
+ apiErrorEvent: EventEmitter<any>;
12
11
  constructor();
13
12
  componentWillLoad(): void;
14
- apiErrorEvent: EventEmitter<any>;
15
13
  howToDone(): void;
16
14
  timeElapsed(): void;
17
15
  captureErrorDone(): void;
@@ -22,7 +20,8 @@ export declare class IdDoubleSide {
22
20
  componentDidLoad(): Promise<void>;
23
21
  uploadPhoto(): Promise<void>;
24
22
  uploadRecording(): Promise<void>;
25
- endFlow(): void;
23
+ private triggerErrorFlow;
24
+ endFlow(): Promise<void>;
26
25
  switchCamera(): void;
27
26
  render(): any;
28
27
  }
@@ -1,14 +1,12 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { Device } from '../../../models/IDevice';
3
2
  export declare class IdSingleSide {
4
- device: Device;
5
3
  private captureRetryCount;
6
- private apiCall;
4
+ private baseComponent;
7
5
  private showTimeout;
8
6
  private showHowTo;
9
7
  private idFlow;
10
- constructor();
11
8
  apiErrorEvent: EventEmitter<any>;
9
+ constructor();
12
10
  captureErrorDone(): void;
13
11
  howToDone(): void;
14
12
  timeElapsed(): void;
@@ -18,7 +16,7 @@ export declare class IdSingleSide {
18
16
  componentDidLoad(): Promise<void>;
19
17
  uploadPhoto(): Promise<void>;
20
18
  uploadRecording(): Promise<void>;
21
- endFlow(): void;
19
+ endFlow(): Promise<void>;
22
20
  switchCamera(): void;
23
21
  render(): any;
24
22
  }
@@ -1,11 +1,10 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { Device } from '../../../models/IDevice';
3
2
  export declare class LandingValidation {
4
- device: Device;
5
3
  warningText: string;
6
4
  buttonDisabled: boolean;
7
- private apiCall;
5
+ private baseComponent;
8
6
  apiErrorEvent: EventEmitter<any>;
7
+ constructor();
9
8
  componentWillLoad(): Promise<void>;
10
9
  componentDidLoad(): Promise<void>;
11
10
  initRequest(): Promise<void>;
@@ -9,7 +9,7 @@ export declare class MobileRedirect {
9
9
  private redirectLink;
10
10
  private qrCode;
11
11
  private prefilledPhone;
12
- private apiCall;
12
+ private baseComponent;
13
13
  apiErrorEvent: EventEmitter<any>;
14
14
  constructor();
15
15
  componentWillLoad(): Promise<void>;
@@ -3,13 +3,13 @@ export declare class SmsCodeValidation {
3
3
  private title;
4
4
  private details;
5
5
  private buttonText;
6
- private apiCall;
7
6
  private phoneNumber;
8
7
  private code;
9
8
  private prefilledPhone;
10
9
  private canSend;
11
- constructor();
10
+ private baseComponent;
12
11
  apiErrorEvent: EventEmitter<any>;
12
+ constructor();
13
13
  private doAction;
14
14
  componentWillRender(): void;
15
15
  componentDidLoad(): Promise<void>;
@@ -1,11 +1,9 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
- import { Device } from '../../../models/IDevice';
3
2
  export declare class UserLiveness {
4
- device: Device;
5
3
  showError: boolean;
6
4
  showHowTo: boolean;
7
- private apiCall;
8
5
  private selfieFlow;
6
+ private baseComponent;
9
7
  apiErrorEvent: EventEmitter<any>;
10
8
  constructor();
11
9
  componentDidLoad(): Promise<void>;
@@ -18,6 +16,7 @@ export declare class UserLiveness {
18
16
  verificationFinished(_event: any): Promise<void>;
19
17
  uploadPhoto(): Promise<void>;
20
18
  uploadRecording(): Promise<void>;
21
- endFlow(): void;
19
+ private triggerErrorFlow;
20
+ endFlow(): Promise<void>;
22
21
  render(): any;
23
22
  }
@@ -8,9 +8,8 @@ export declare class IdentificationComponent {
8
8
  private idSide;
9
9
  private errorMessage;
10
10
  private errorTitle;
11
- private device;
12
- private apiCall;
13
11
  private logInit;
12
+ private baseComponent;
14
13
  onTokenChange(newValue: string, _oldValue: string): Promise<void>;
15
14
  onOrderIdChange(newValue: string, _oldValue: string): Promise<void>;
16
15
  onApiUrlChange(newValue: string, _oldValue: string): void;
@@ -5,7 +5,6 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { Device } from "./models/IDevice";
9
8
  export namespace Components {
10
9
  interface AgreementCheck {
11
10
  "agreementType": string;
@@ -14,12 +13,10 @@ export namespace Components {
14
13
  }
15
14
  interface CameraComp {
16
15
  "captureMode": string;
17
- "device": Device;
18
16
  "modelPath": string;
19
17
  "probabilityThreshold": number;
20
18
  }
21
19
  interface CameraError {
22
- "device": Device;
23
20
  }
24
21
  interface CaptureError {
25
22
  "type": string;
@@ -34,16 +31,12 @@ export namespace Components {
34
31
  "idSide": string;
35
32
  }
36
33
  interface IdBackCapture {
37
- "device": Device;
38
34
  }
39
35
  interface IdCapture {
40
- "device": Device;
41
36
  }
42
37
  interface IdDoubleSide {
43
- "device": Device;
44
38
  }
45
39
  interface IdSingleSide {
46
- "device": Device;
47
40
  }
48
41
  interface IdentificationComponent {
49
42
  "api_url": string;
@@ -54,19 +47,16 @@ export namespace Components {
54
47
  "token": string;
55
48
  }
56
49
  interface LandingValidation {
57
- "device": Device;
58
50
  }
59
51
  interface LoaderDots {
60
52
  }
61
53
  interface MobileRedirect {
62
54
  }
63
55
  interface SelfieCapture {
64
- "device": Device;
65
56
  }
66
57
  interface SmsCodeValidation {
67
58
  }
68
59
  interface UserLiveness {
69
- "device": Device;
70
60
  }
71
61
  }
72
62
  export interface AgreementCheckCustomEvent<T> extends CustomEvent<T> {
@@ -281,7 +271,6 @@ declare namespace LocalJSX {
281
271
  }
282
272
  interface CameraComp {
283
273
  "captureMode"?: string;
284
- "device"?: Device;
285
274
  "modelPath"?: string;
286
275
  "onChangeTitle"?: (event: CameraCompCustomEvent<any>) => void;
287
276
  "onCloseCamera"?: (event: CameraCompCustomEvent<any>) => void;
@@ -295,7 +284,6 @@ declare namespace LocalJSX {
295
284
  "probabilityThreshold"?: number;
296
285
  }
297
286
  interface CameraError {
298
- "device"?: Device;
299
287
  "onApiError"?: (event: CameraErrorCustomEvent<any>) => void;
300
288
  }
301
289
  interface CaptureError {
@@ -314,19 +302,15 @@ declare namespace LocalJSX {
314
302
  "onHowToInfoDone"?: (event: HowToInfoCustomEvent<any>) => void;
315
303
  }
316
304
  interface IdBackCapture {
317
- "device"?: Device;
318
305
  "onPhotoIdBackCapture"?: (event: IdBackCaptureCustomEvent<any>) => void;
319
306
  }
320
307
  interface IdCapture {
321
- "device"?: Device;
322
308
  "onPhotoIdCapture"?: (event: IdCaptureCustomEvent<any>) => void;
323
309
  }
324
310
  interface IdDoubleSide {
325
- "device"?: Device;
326
311
  "onApiError"?: (event: IdDoubleSideCustomEvent<any>) => void;
327
312
  }
328
313
  interface IdSingleSide {
329
- "device"?: Device;
330
314
  "onApiError"?: (event: IdSingleSideCustomEvent<any>) => void;
331
315
  }
332
316
  interface IdentificationComponent {
@@ -338,7 +322,6 @@ declare namespace LocalJSX {
338
322
  "token"?: string;
339
323
  }
340
324
  interface LandingValidation {
341
- "device"?: Device;
342
325
  "onApiError"?: (event: LandingValidationCustomEvent<any>) => void;
343
326
  }
344
327
  interface LoaderDots {
@@ -347,14 +330,12 @@ declare namespace LocalJSX {
347
330
  "onApiError"?: (event: MobileRedirectCustomEvent<any>) => void;
348
331
  }
349
332
  interface SelfieCapture {
350
- "device"?: Device;
351
333
  "onPhotoSelfieCapture"?: (event: SelfieCaptureCustomEvent<any>) => void;
352
334
  }
353
335
  interface SmsCodeValidation {
354
336
  "onApiError"?: (event: SmsCodeValidationCustomEvent<any>) => void;
355
337
  }
356
338
  interface UserLiveness {
357
- "device"?: Device;
358
339
  "onApiError"?: (event: UserLivenessCustomEvent<any>) => void;
359
340
  }
360
341
  interface IntrinsicElements {
@@ -1,6 +1,6 @@
1
- import { Device } from '../models/IDevice';
2
1
  import { OrderStatuses } from '../models/OrderStatuses';
3
- import { FlowSteps } from '../models/FlowSteps';
2
+ import { FlowMoments, FlowSteps } from '../models/FlowSteps';
3
+ import { DeviceState } from '../models/IDevice';
4
4
  export declare class ApiCall {
5
5
  private urls;
6
6
  constructor();
@@ -9,14 +9,14 @@ export declare class ApiCall {
9
9
  private get;
10
10
  SendOTPCode(requestId: string, phoneNumber: string): Promise<boolean | Error>;
11
11
  CheckOTPCode(requestId: string, otpCode: string): Promise<boolean | Error>;
12
- AddIdentificationRequest(deviceInfo: Device, version: string): Promise<any | Error>;
12
+ AddIdentificationRequest(deviceInfo: DeviceState, version: string): Promise<any | Error>;
13
13
  UploadFileForRequestB64(requestId: string, type: string, file: File): Promise<boolean>;
14
14
  GetAgreement(agreementType: string): Promise<string>;
15
15
  GenerateAgreement(agreementType: string): Promise<boolean>;
16
16
  GetStatus(requestId: string): Promise<OrderStatuses>;
17
17
  SendLink(link: string, phoneNumber: string): Promise<boolean>;
18
18
  AddLog(error: any, context: any): Promise<boolean>;
19
- AddStep(step: FlowSteps): Promise<boolean>;
19
+ AddStep(step: FlowSteps, moment: FlowMoments): Promise<boolean>;
20
20
  AbortRequest(): Promise<boolean>;
21
21
  toBase64: (file: File) => Promise<unknown>;
22
22
  }
@@ -1,9 +1,9 @@
1
1
  import { Camera } from '../models/ICamera';
2
- import { Device } from '../models/IDevice';
3
2
  import { Constraints } from '../models/IConstraints';
3
+ import { DeviceState } from '../models/IDevice';
4
4
  export declare class Cameras {
5
- GetCameras(deviceInfo: Device): Promise<Camera[]>;
6
- GetConstraints(selectedDeviceId: string, device: Device, portrait?: boolean): Constraints | any;
5
+ GetCameras(deviceInfo: DeviceState): Promise<Camera[]>;
6
+ GetConstraints(selectedDeviceId: string, device: DeviceState, portrait?: boolean): Constraints | any;
7
7
  GetRecommendedCamera(cameras: any): any;
8
- static InitCameras(device: Device): Promise<boolean>;
8
+ static InitCameras(device: DeviceState): Promise<boolean>;
9
9
  }
@@ -0,0 +1,18 @@
1
+ import { DeviceState } from '../models/IDevice';
2
+ export declare class DeviceDetection {
3
+ private userAgent;
4
+ private isDesktop;
5
+ private isMobile;
6
+ private isTablet;
7
+ constructor();
8
+ private isMobileDevice;
9
+ private isTabletDevice;
10
+ private getMobileOS;
11
+ private getDesktopOS;
12
+ private getDeviceOS;
13
+ private getBrowser;
14
+ private supportedScreenOrientation;
15
+ private safariScreenOrientation;
16
+ private initialScreenOrientation;
17
+ getDevice(): DeviceState;
18
+ }
@@ -1,6 +1,8 @@
1
+ import { FlowMoments, FlowSteps } from '../models/FlowSteps';
1
2
  export default class Events {
2
3
  static callingModule: any;
3
4
  static init(element: any): void;
5
+ static flowEvent(step: FlowSteps, moment: FlowMoments): void;
4
6
  static flowStarted(): void;
5
7
  static flowAborted(): void;
6
8
  static flowCompleted(): void;
@@ -1,4 +1,3 @@
1
- import { Device } from '../models/IDevice';
2
1
  import { FacePose } from '../libs/FaceML5Detector/FacePose';
3
2
  import { IDPose } from '../libs/IDML5Detector/IDPose';
4
3
  export declare class Stream {
@@ -16,7 +15,6 @@ export declare class Stream {
16
15
  };
17
16
  static instance: Stream;
18
17
  streamPaused: boolean;
19
- private device;
20
18
  private videoElement;
21
19
  private canvasElement;
22
20
  private stream;
@@ -44,7 +42,7 @@ export declare class Stream {
44
42
  setCallbackTimeElapsed(fun: () => void): void;
45
43
  setVerificationFinished(fun: () => void): void;
46
44
  private constructor();
47
- static getInstance(device?: Device, modelPath?: string): Stream;
45
+ static getInstance(modelPath?: string): Stream;
48
46
  autoCapturing(): void;
49
47
  timeElapsed(): void;
50
48
  verificationReady(): void;
@@ -1,4 +1,2 @@
1
- import { Device } from '../models/IDevice';
2
- export declare const initDevice: () => Device;
3
1
  export declare const convertToDataUrl: (file: any[]) => Promise<unknown>;
4
2
  export declare const blobToBase64: (blob: Blob) => Promise<string>;
@@ -1,18 +1,3 @@
1
- import { FlowStatus } from '../models/FlowStatus';
2
- declare const state: {
3
- flowStatus: FlowStatus;
4
- environment: string;
5
- debug: boolean;
6
- requestId: string;
7
- redirectId: string;
8
- initialised: boolean;
9
- token: string;
10
- cameraIds: any[];
11
- cameraId: string;
12
- hasIdBack: boolean;
13
- agreementsValidation: boolean;
14
- phoneValidation: boolean;
15
- phoneNumber: string;
16
- apiBaseUrl: string;
17
- };
1
+ import { EctStore } from '../models/IEctStore';
2
+ declare const state: EctStore;
18
3
  export default state;
@@ -1,15 +1,20 @@
1
1
  export declare enum FlowSteps {
2
- MobileRedirect = 0,
3
- Landing = 1,
4
- Agreements = 2,
5
- OtpSend = 3,
6
- OtpCheck = 4,
7
- CiFrontHowTo = 5,
8
- CiFront = 6,
9
- CiBackHowTo = 7,
10
- CiBack = 8,
11
- SelfieHowTo = 9,
12
- Selfie = 10,
13
- End = 11,
14
- CameraError = 12
2
+ MobileRedirect = "mobile-redirect",
3
+ Landing = "landing",
4
+ Agreements = "agreements",
5
+ OtpSend = "otp-send",
6
+ OtpCheck = "otp-check",
7
+ CiFrontHowTo = "ci-front-how-to",
8
+ CiFront = "ci-front",
9
+ CiBackHowTo = "ci-back-how-to",
10
+ CiBack = "ci-back",
11
+ SelfieHowTo = "selfie-how-to",
12
+ Selfie = "selfie",
13
+ End = "end",
14
+ CameraError = "camera-error"
15
+ }
16
+ export declare enum FlowMoments {
17
+ Initialized = "initialized",
18
+ Finalized = "finalized",
19
+ None = "none"
15
20
  }
@@ -1,11 +1,34 @@
1
- export interface Device {
2
- isFirefox: boolean;
3
- isLinux: boolean;
4
- isMac: boolean;
1
+ export interface DeviceState {
2
+ isDesktop: boolean;
3
+ desktopOS: DesktopOS | undefined;
4
+ isWindowsDesktop: boolean;
5
+ isLinuxOrUnixDesktop: boolean;
5
6
  isMobile: boolean;
6
- isSafari: boolean;
7
- isAndroid: boolean;
8
- isIos: boolean;
9
- isWin: boolean;
10
- isChrome: boolean;
7
+ mobileOS: MobileOS | undefined;
8
+ isAndroidDevice: boolean;
9
+ isAppleDevice: boolean;
10
+ isUnknownMobileDevice: boolean;
11
+ browser: Browser | undefined;
12
+ isTablet: boolean;
13
+ initialScreenOrientation: string;
11
14
  }
15
+ export declare enum MobileOS {
16
+ Android = "android",
17
+ iOS = "ios",
18
+ Unknown = "unknown",
19
+ WindowsPhone = "Windows Phone"
20
+ }
21
+ export declare enum DesktopOS {
22
+ Linux = "linux",
23
+ MacOS = "mac_os",
24
+ Unix = "unix",
25
+ Unknown = "unknown",
26
+ Windows = "windows"
27
+ }
28
+ export declare enum Browser {
29
+ Chrome = "chrome",
30
+ Firefox = "firefox",
31
+ Safari = "safari",
32
+ Unknown = "unknown"
33
+ }
34
+ export type DeviceOS = DesktopOS | MobileOS;
@@ -0,0 +1,20 @@
1
+ import { FlowStatus } from './FlowStatus';
2
+ import { DeviceState } from './IDevice';
3
+ export interface EctStore {
4
+ flowStatus: FlowStatus;
5
+ environment: string;
6
+ debug: boolean;
7
+ requestId: string;
8
+ redirectId: string;
9
+ initialised: boolean;
10
+ token: string;
11
+ cameraIds: string[];
12
+ cameraId: string;
13
+ hasIdBack: boolean;
14
+ agreementsValidation: boolean;
15
+ phoneValidation: boolean;
16
+ phoneNumber: string;
17
+ apiBaseUrl: string;
18
+ device: DeviceState;
19
+ recordingRetryCount: number;
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekyc_qoobiss/qbs-ect-cmp",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Person Identification Component",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.js",