@authme/identity-verification 2.3.1-rc.3 → 2.4.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.
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@authme/identity-verification",
3
- "version": "2.3.1-rc.3",
3
+ "version": "2.4.2",
4
4
  "peerDependencies": {
5
5
  "core-js": "^3.6.0",
6
6
  "lottie-web": "^5.9.2",
7
7
  "rxjs": "^7.4.0",
8
- "@authme/core": "2.3.1-rc.3",
9
- "@authme/engine": "2.3.1-rc.3",
10
- "@authme/id-recognition": "2.3.1-rc.3",
11
- "@authme/util": "2.3.1-rc.3",
12
- "@authme/liveness": "2.3.1-rc.3"
8
+ "@authme/core": "2.4.2",
9
+ "@authme/engine": "2.4.2",
10
+ "@authme/id-recognition": "2.4.2",
11
+ "@authme/util": "2.4.2",
12
+ "@authme/liveness": "2.4.2"
13
13
  },
14
14
  "module": "./index.js",
15
15
  "main": "./index.cjs",
@@ -2,6 +2,8 @@ import { MlEngineConfig } from '@authme/engine';
2
2
  import { CountryCode, IdRecognitionCardType } from '@authme/id-recognition';
3
3
  export interface IdentityVerificationConfig extends MlEngineConfig {
4
4
  canvas?: HTMLCanvasElement;
5
+ OCRIdcardResultFormat?: 'default' | 'splitDateAndAddress';
6
+ loadingLottie?: any;
5
7
  }
6
8
  export declare const defaultIdentityVerificationConfig: IdentityVerificationConfig;
7
9
  export interface LivenessConfig {
@@ -10,6 +12,8 @@ export interface LivenessConfig {
10
12
  showIntroPage?: boolean;
11
13
  headerMode?: number;
12
14
  showCloseButton?: boolean;
15
+ uploadFullFrame?: boolean;
16
+ subtitle?: string | null;
13
17
  }
14
18
  export interface ExtraDocumentConfig {
15
19
  active: boolean;
@@ -40,9 +44,14 @@ export interface IdRecognitionConfig {
40
44
  headerMode?: number;
41
45
  blockFraud?: boolean;
42
46
  showCloseButton?: boolean;
47
+ disableTutorial?: boolean;
48
+ hotfixIphone14proCameraBlur?: boolean;
49
+ uploadFullFrame?: boolean;
50
+ disablePassportConfirm?: boolean;
43
51
  }
44
52
  export interface GetCardTypeAndCountryConfig {
45
53
  supportCountries: CountryCode[];
54
+ defaultCountry: CountryCode;
46
55
  supportCardTypes: (country: CountryCode) => IdRecognitionCardType[];
47
56
  }
48
57
  export declare const defaultIdRecognitionConfig: Required<IdRecognitionConfig>;
@@ -5,8 +5,9 @@ import { AuthmeOCRResult } from '../interface/result.model';
5
5
  export declare class MRZModule {
6
6
  private engine;
7
7
  private canvas;
8
+ private type;
8
9
  private mrzService;
9
- constructor(engine: MlEngine, canvas: HTMLCanvasElement | undefined);
10
+ constructor(engine: MlEngine, canvas: HTMLCanvasElement | undefined, type?: 'passport' | 'residentCard');
10
11
  preloadAsync(): Promise<boolean>;
11
12
  destroy(): Promise<void>;
12
13
  run(config: Required<IdRecognitionConfig>, acceptTypes: EAuthMeCardClass[]): Promise<AuthmeOCRResult>;
@@ -7,6 +7,7 @@ export declare class OCRModule {
7
7
  private canvas;
8
8
  private ocrService;
9
9
  private antiFraudInstance;
10
+ private residentCardMrzService;
10
11
  constructor(engine: MlEngine, canvas: HTMLCanvasElement | undefined);
11
12
  preloadOcrAsync(): Promise<boolean>;
12
13
  preloadAntiFraudAsync(): Promise<boolean>;
@@ -1,12 +1,13 @@
1
+ import { EAuthMeCardClass } from '@authme/engine';
1
2
  import { CanvasSizeInfo } from '@authme/util';
2
3
  import { Observable } from 'rxjs';
3
4
  export declare const limitFPS: (fps: number) => (source: Observable<any>) => Observable<any>;
4
5
  export declare const sendFrame: <T>(canvasSizeInfo: CanvasSizeInfo, canvas: HTMLCanvasElement, video: HTMLVideoElement, frameCallback: ((data: Uint8ClampedArray) => Promise<T>) | ((data: Uint8ClampedArray, base64: {
5
6
  jpg: string;
6
7
  png: string;
7
- }) => Promise<T>), fps: number, bas64Format: boolean, imageType: 'jpg' | 'png' | 'all', flags?: {
8
+ }, type?: EAuthMeCardClass) => Promise<T>), fps: number, bas64Format: boolean, imageType: 'jpg' | 'png' | 'all', flags?: {
8
9
  animating: boolean;
9
- }) => (source$: Observable<any>) => Observable<{
10
+ }, type?: EAuthMeCardClass) => (source$: Observable<any>) => Observable<{
10
11
  imageData: {
11
12
  data: Uint8ClampedArray;
12
13
  base64: {
@@ -0,0 +1,5 @@
1
+ export declare const eventListenerService: import("dist/libs/core/src/lib/features/event-listener/event-listener.service").EventListenerService;
2
+ export declare const sendStatusAction: (statusAction: import("dist/libs/core/src").StatusAction) => Promise<void>, sendStatusDescription: (statusDescription: import("dist/libs/core/src").StatusDescription) => Promise<void>, featureUseState: [() => import("dist/libs/core/src").Feature, (value: import("dist/libs/core/src").Feature) => void], eventUseState: [() => import("dist/libs/core/src").StatusEvent, (value: import("dist/libs/core/src").StatusEvent) => void], viewUseState: [() => import("dist/libs/core/src").StatusView, (value: import("dist/libs/core/src").StatusView) => void];
3
+ export declare const setFeature: (value: import("dist/libs/core/src").Feature) => void;
4
+ export declare const setStatusEvent: (value: import("dist/libs/core/src").StatusEvent) => void;
5
+ export declare const setStatusView: (value: import("dist/libs/core/src").StatusView) => void;
@@ -0,0 +1,28 @@
1
+ import { Feature, StatusEvent, StatusView, StatusAction, StatusDescription, EventListenerService } from '@authme/core';
2
+ declare type RecordedEvent = StatusDescription | StatusAction;
3
+ export declare class DurationService {
4
+ private static isEngineRecordedEvent;
5
+ private static isUIRecordedEvent;
6
+ private static isUploadType;
7
+ private getEventType;
8
+ getDuration(event: RecordedEvent, lastTimeCache: Map<string, number>): [number | undefined, Map<string, number>];
9
+ }
10
+ export declare class EventTrackingService {
11
+ private readonly featureName;
12
+ private lastTimeCache;
13
+ private durationService;
14
+ private _translateInstance;
15
+ private _featureUseState;
16
+ private _eventUseState;
17
+ private _viewUseState;
18
+ private _eventListenerService;
19
+ constructor(featureName: string);
20
+ get featureUseState(): [() => Feature, (value: Feature) => void];
21
+ get eventUseState(): [() => StatusEvent, (value: StatusEvent) => void];
22
+ get viewUseState(): [() => StatusView, (value: StatusView) => void];
23
+ get eventListenerService(): EventListenerService;
24
+ generateLivenessPingStatus: () => Promise<import("@authme/core").EventTrackingStatus>;
25
+ sendStatusAction: (statusAction: StatusAction) => Promise<void>;
26
+ sendStatusDescription: (statusDescription: StatusDescription) => Promise<void>;
27
+ }
28
+ export {};
@@ -0,0 +1,10 @@
1
+ import { EAuthMeFASServiceStage } from '@authme/engine';
2
+ import { StatusDescription, StatusEvent } from '@authme/core';
3
+ import { FasRecognitionResult } from '@authme/liveness';
4
+ export declare const eventListenerService: import("dist/libs/core/src/lib/features/event-listener/event-listener.service").EventListenerService;
5
+ export declare const sendStatusAction: (statusAction: import("@authme/core").StatusAction) => Promise<void>, sendStatusDescription: (statusDescription: StatusDescription) => Promise<void>, featureUseState: [() => import("@authme/core").Feature, (value: import("@authme/core").Feature) => void], eventUseState: [() => StatusEvent, (value: StatusEvent) => void], viewUseState: [() => import("@authme/core").StatusView, (value: import("@authme/core").StatusView) => void];
6
+ export declare const setFeature: (value: import("@authme/core").Feature) => void;
7
+ export declare const setStatusEvent: (value: StatusEvent) => void;
8
+ export declare const setStatusView: (value: import("@authme/core").StatusView) => void;
9
+ export declare const fasRecognitionResultMapping: (fasRecognitionResult: FasRecognitionResult) => StatusDescription;
10
+ export declare const fasServiceStageMapping: (fasServiceStage: EAuthMeFASServiceStage) => StatusEvent;
@@ -0,0 +1,9 @@
1
+ import { EAuthMeCardClass } from '@authme/id-recognition';
2
+ import { StatusEvent } from '@authme/core';
3
+ export declare const eventListenerService: import("dist/libs/core/src/lib/features/event-listener/event-listener.service").EventListenerService;
4
+ export declare const sendStatusAction: (statusAction: import("@authme/core").StatusAction) => Promise<void>, sendStatusDescription: (statusDescription: import("@authme/core").StatusDescription) => Promise<void>, featureUseState: [() => import("@authme/core").Feature, (value: import("@authme/core").Feature) => void], eventUseState: [() => StatusEvent, (value: StatusEvent) => void], viewUseState: [() => import("@authme/core").StatusView, (value: import("@authme/core").StatusView) => void];
5
+ export declare const setFeature: (value: import("@authme/core").Feature) => void;
6
+ export declare const setStatusEvent: (value: StatusEvent) => void;
7
+ export declare const setStatusView: (value: import("@authme/core").StatusView) => void;
8
+ export declare const cardClassMapping: (eAuthmeCardClass: EAuthMeCardClass) => StatusEvent;
9
+ export declare const cardClassResultMapping: (eAuthmeCardClass: EAuthMeCardClass) => StatusEvent;
@@ -15,3 +15,4 @@ export declare const renderBasicUI: (userConfig: BasicUIConfig) => {
15
15
  lottieScreen: HTMLDivElement;
16
16
  pictureIcon: HTMLDivElement;
17
17
  };
18
+ export declare function _render<K extends keyof HTMLElementTagNameMap>(tagname: K, action?: (elem: HTMLElementTagNameMap[K]) => void, children?: Node[]): HTMLElementTagNameMap[K];
@@ -0,0 +1,3 @@
1
+ import { GetCardTypeAndCountryConfig } from '../interface';
2
+ import { CardTypeAndCountry } from '../interface/result.model';
3
+ export declare function renderCardTypeAndCountryConfig(config: GetCardTypeAndCountryConfig): Promise<CardTypeAndCountry>;
@@ -24,7 +24,10 @@ export declare function startOCR(config: {
24
24
  ]
25
25
  ], type: EAuthMeCardClass, retry?: boolean) => Promise<boolean>;
26
26
  acceptTypes: EAuthMeCardClass[];
27
- recognition: (img: Uint8ClampedArray) => Promise<CardOCRResult | PassportResult>;
27
+ recognition: (img: Uint8ClampedArray, base64: {
28
+ jpg: string;
29
+ png: string;
30
+ }, type?: EAuthMeCardClass) => Promise<CardOCRResult | PassportResult>;
28
31
  confirmImage: (type: EAuthMeCardClass) => Promise<boolean>;
29
32
  antiFraudStart: (points: [
30
33
  [
@@ -1,6 +1,4 @@
1
1
  import { IdRecognitionCardType } from '@authme/id-recognition';
2
- import { GetCardTypeAndCountryConfig } from '../interface';
3
- import { CardTypeAndCountry } from '../interface/result.model';
4
2
  export declare enum OcrRotateDirection {
5
3
  Left = "perspective(100vw) rotateY(30deg) scale(0.9)",
6
4
  Right = "perspective(100vw) rotateY(-30deg) scale(0.9)",
@@ -60,4 +58,3 @@ export declare function renderConfirmUI({ cardType, items, options: { headerIcon
60
58
  }): Promise<{
61
59
  [column: string]: string;
62
60
  }>;
63
- export declare function renderCardTypeAndCountryConfig(config: GetCardTypeAndCountryConfig): Promise<CardTypeAndCountry>;
@@ -1,2 +1,9 @@
1
1
  import { Observable, Subject } from 'rxjs';
2
- export declare function makeResizedError$(unsubscribe$: Subject<void>): Observable<never>;
2
+ declare enum RESIZE_EVENT {
3
+ SCREEN_RESOLUTION_TOO_LOW = "SCREEN_RESOLUTION_TOO_LOW",
4
+ SCREEN_SIZE_CHANGED = "SCREEN_SIZE_CHANGED",
5
+ PASS = "PASS"
6
+ }
7
+ export declare function detectScreenResize$(): Observable<RESIZE_EVENT>;
8
+ export declare function handleScreenResizeError$(resize$: Observable<RESIZE_EVENT>, unsubscribe$: Subject<void>, shouldResizeTriggerError?: () => boolean): Observable<never>;
9
+ export {};