@authme/identity-verification 2.8.41 → 2.8.44

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 (70) hide show
  1. package/assets/locale/en_US.json +10 -0
  2. package/assets/locale/ja_JP.json +10 -0
  3. package/assets/locale/zh_Hant_TW.json +11 -0
  4. package/assets/styles/style.css +48 -1
  5. package/index.cjs.d.ts +1 -0
  6. package/{index.cjs → index.cjs.js} +4904 -4834
  7. package/index.esm.d.ts +1 -0
  8. package/{index.js → index.esm.js} +4904 -4828
  9. package/package.json +6 -13
  10. package/src/index.d.ts +5 -5
  11. package/src/lib/identity-verification-feature-identity-verification.d.ts +42 -42
  12. package/src/lib/interface/config.interface.d.ts +127 -127
  13. package/src/lib/interface/index.d.ts +1 -1
  14. package/src/lib/interface/result.model.d.ts +50 -50
  15. package/src/lib/lottie/arrow_down.d.ts +215 -215
  16. package/src/lib/lottie/arrow_left.d.ts +215 -215
  17. package/src/lib/lottie/arrow_right.d.ts +215 -215
  18. package/src/lib/lottie/arrow_up.d.ts +215 -215
  19. package/src/lib/lottie/card_lr.d.ts +182 -182
  20. package/src/lib/lottie/card_rotate_down.d.ts +396 -396
  21. package/src/lib/lottie/card_rotate_left.d.ts +396 -396
  22. package/src/lib/lottie/card_rotate_right.d.ts +396 -396
  23. package/src/lib/lottie/card_rotate_up.d.ts +412 -412
  24. package/src/lib/lottie/card_ud.d.ts +182 -182
  25. package/src/lib/lottie/circle_large_to_sm_mask.d.ts +595 -595
  26. package/src/lib/lottie/circle_sm_to_large_mask.d.ts +595 -595
  27. package/src/lib/lottie/fraudScanIntroPageStep1.d.ts +1449 -1449
  28. package/src/lib/lottie/index.d.ts +16 -16
  29. package/src/lib/lottie/scan.d.ts +566 -566
  30. package/src/lib/lottie/success.d.ts +949 -949
  31. package/src/lib/lottie/tutorial.d.ts +978 -978
  32. package/src/lib/module/extra.module.d.ts +7 -7
  33. package/src/lib/module/liveness-verify.module.d.ts +13 -13
  34. package/src/lib/module/liveness.module.d.ts +14 -14
  35. package/src/lib/module/mrz.module.d.ts +14 -14
  36. package/src/lib/module/ocr.module.d.ts +16 -16
  37. package/src/lib/operator/index.d.ts +19 -19
  38. package/src/lib/service/card-type-and-country.service.d.ts +5 -5
  39. package/src/lib/service/event-tracking.service.d.ts +28 -28
  40. package/src/lib/service/liveness.service.d.ts +10 -10
  41. package/src/lib/service/ocr.service.d.ts +9 -9
  42. package/src/lib/status/scan-view.status.d.ts +3 -3
  43. package/src/lib/ui/basic/index.d.ts +18 -18
  44. package/src/lib/ui/card-type-and-country.ui.d.ts +3 -3
  45. package/src/lib/ui/default-images.d.ts +2 -2
  46. package/src/lib/ui/extra-flow.d.ts +8 -8
  47. package/src/lib/ui/extra.ui.d.ts +17 -17
  48. package/src/lib/ui/index.d.ts +5 -5
  49. package/src/lib/ui/liveness-flow.d.ts +23 -24
  50. package/src/lib/ui/liveness.ui.d.ts +20 -20
  51. package/src/lib/ui/ocr-flow.d.ts +118 -118
  52. package/src/lib/ui/ocr.animate.d.ts +7 -7
  53. package/src/lib/ui/ocr.ui.d.ts +123 -123
  54. package/src/lib/ui/shared.d.ts +9 -9
  55. package/src/lib/ui/ui-init.d.ts +1 -1
  56. package/src/lib/v2/component/countryCardType.d.ts +3 -3
  57. package/src/lib/v2/component/frameView.d.ts +2 -2
  58. package/src/lib/v2/images/index.d.ts +1 -1
  59. package/src/lib/v2/index.d.ts +6 -6
  60. package/src/lib/v2/interface/index.d.ts +1 -1
  61. package/src/lib/v2/thickness.d.ts +22 -73
  62. package/src/lib/v2/ui/button.d.ts +1 -1
  63. package/src/lib/v2/ui/confirmPop.d.ts +11 -11
  64. package/src/lib/v2/ui/fraudScanIntroPage.d.ts +12 -12
  65. package/src/lib/v2/ui/modal.d.ts +11 -11
  66. package/src/lib/v2/ui/ocrResultModal.d.ts +13 -13
  67. package/src/lib/v2/ui/popupView.d.ts +8 -8
  68. package/src/lib/v2/ui/toast.d.ts +7 -7
  69. package/src/lib/v2/utilities/index.d.ts +25 -25
  70. package/src/lib/version.d.ts +1 -1
package/package.json CHANGED
@@ -1,19 +1,12 @@
1
1
  {
2
2
  "name": "@authme/identity-verification",
3
- "version": "2.8.41",
3
+ "version": "2.8.44",
4
4
  "peerDependencies": {
5
5
  "core-js": "^3.6.0",
6
6
  "lottie-web": "^5.9.2",
7
- "rxjs": "^7.4.0",
8
- "@authme/core": "2.8.41",
9
- "@authme/engine": "2.8.41",
10
- "@authme/id-recognition": "2.8.41",
11
- "@authme/liveness": "2.8.41",
12
- "@authme/util": "2.8.41"
7
+ "rxjs": "^7.4.0"
13
8
  },
14
- "module": "./index.js",
15
- "main": "./index.cjs",
16
- "type": "module",
17
- "types": "./src/index.d.ts",
18
- "dependencies": {}
19
- }
9
+ "module": "./index.esm.js",
10
+ "main": "./index.cjs.js",
11
+ "types": "./index.esm.d.ts"
12
+ }
package/src/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './lib/identity-verification-feature-identity-verification';
2
- export * from './lib/interface';
3
- export * from './lib/ui';
4
- export * from './lib/lottie';
5
- export { version } from './lib/version';
1
+ export * from './lib/identity-verification-feature-identity-verification';
2
+ export * from './lib/interface';
3
+ export * from './lib/ui';
4
+ export * from './lib/lottie';
5
+ export { version } from './lib/version';
@@ -1,42 +1,42 @@
1
- import { AuthmeFunctionModule } from '@authme/engine';
2
- import { IdentityVerificationConfig, IdRecognitionConfig, LivenessConfig, GetCardTypeAndCountryConfig, ExtraDocumentConfig } from './interface';
3
- import { AuthmeExtraDocumentResult, AuthmeLivenessResult, AuthmeOCRResult, CardTypeAndCountry } from './interface/result.model';
4
- import { DEVICE_TYPE } from '@authme/util';
5
- export declare function identityVerificationFeatureIdentityVerification(): string;
6
- export declare class AuthmeIdentityVerification extends AuthmeFunctionModule {
7
- private engine;
8
- private livenessModule;
9
- private livenessVerifyModule;
10
- private extraDocumentModule;
11
- private isAuth;
12
- private ocrModule;
13
- private mrzModule;
14
- private tearDownPromise;
15
- preloadAsync(modules: ('OCR' | 'ANTI_FRAUD' | 'MRZ' | 'LIVENESS')[]): Promise<void>;
16
- preloadBackground(modules: ('OCR' | 'ANTI_FRAUD' | 'MRZ' | 'LIVENESS')[]): void;
17
- init(config: IdentityVerificationConfig): Promise<void>;
18
- liveness(userConfig?: Partial<LivenessConfig>): Promise<AuthmeLivenessResult>;
19
- livenessVerify(userConfig: LivenessConfig): Promise<AuthmeLivenessResult>;
20
- getCardTypeAndCountry(userConfig: Partial<GetCardTypeAndCountryConfig>): Promise<CardTypeAndCountry>;
21
- extraDocument(userConfig?: Partial<ExtraDocumentConfig>): Promise<AuthmeExtraDocumentResult>;
22
- IdRecognition(userConfig: IdRecognitionConfig): Promise<AuthmeOCRResult>;
23
- confirmOCRResult(data: {
24
- scanId: string | undefined;
25
- details: {
26
- [key: string]: string;
27
- };
28
- }): Promise<AuthmeOCRResult>;
29
- auth(authParams: {
30
- cert: string;
31
- authToken: string;
32
- showLoadingUI?: boolean;
33
- }): Promise<boolean>;
34
- _tearDown(): Promise<void>;
35
- tearDown(): Promise<void>;
36
- cleanAllModel(): Promise<void>;
37
- getCustomerState(arg?: {
38
- waitingTime?: number;
39
- retryTimes?: number;
40
- }): Promise<any>;
41
- DEVICE_TYPE: typeof DEVICE_TYPE;
42
- }
1
+ import { AuthmeFunctionModule } from '@authme/engine';
2
+ import { IdentityVerificationConfig, IdRecognitionConfig, LivenessConfig, GetCardTypeAndCountryConfig, ExtraDocumentConfig } from './interface';
3
+ import { AuthmeExtraDocumentResult, AuthmeLivenessResult, AuthmeOCRResult, CardTypeAndCountry } from './interface/result.model';
4
+ import { DEVICE_TYPE } from '@authme/util';
5
+ export declare function identityVerificationFeatureIdentityVerification(): string;
6
+ export declare class AuthmeIdentityVerification extends AuthmeFunctionModule {
7
+ private engine;
8
+ private livenessModule;
9
+ private livenessVerifyModule;
10
+ private extraDocumentModule;
11
+ private isAuth;
12
+ private ocrModule;
13
+ private mrzModule;
14
+ private tearDownPromise;
15
+ preloadAsync(modules: ('OCR' | 'ANTI_FRAUD' | 'MRZ' | 'LIVENESS')[]): Promise<void>;
16
+ preloadBackground(modules: ('OCR' | 'ANTI_FRAUD' | 'MRZ' | 'LIVENESS')[]): void;
17
+ init(config: IdentityVerificationConfig): Promise<void>;
18
+ liveness(userConfig?: Partial<LivenessConfig>): Promise<AuthmeLivenessResult>;
19
+ livenessVerify(userConfig: LivenessConfig): Promise<AuthmeLivenessResult>;
20
+ getCardTypeAndCountry(userConfig: Partial<GetCardTypeAndCountryConfig>): Promise<CardTypeAndCountry>;
21
+ extraDocument(userConfig?: Partial<ExtraDocumentConfig>): Promise<AuthmeExtraDocumentResult>;
22
+ IdRecognition(userConfig: IdRecognitionConfig): Promise<AuthmeOCRResult>;
23
+ confirmOCRResult(data: {
24
+ scanId: string | undefined;
25
+ details: {
26
+ [key: string]: string;
27
+ };
28
+ }): Promise<AuthmeOCRResult>;
29
+ auth(authParams: {
30
+ cert: string;
31
+ authToken: string;
32
+ showLoadingUI?: boolean;
33
+ }): Promise<boolean>;
34
+ _tearDown(): Promise<void>;
35
+ tearDown(): Promise<void>;
36
+ cleanAllModel(): Promise<void>;
37
+ getCustomerState(arg?: {
38
+ waitingTime?: number;
39
+ retryTimes?: number;
40
+ }): Promise<any>;
41
+ DEVICE_TYPE: typeof DEVICE_TYPE;
42
+ }
@@ -1,127 +1,127 @@
1
- import { MlEngineConfig } from '@authme/engine';
2
- import { CountryCode, IdRecognitionCardType } from '@authme/id-recognition';
3
- import { DEVICE_TYPE } from '@authme/util';
4
- export interface IdentityVerificationConfig extends MlEngineConfig {
5
- canvas?: HTMLCanvasElement;
6
- OCRIdcardResultFormat?: 'default' | 'splitDateAndAddress';
7
- loadingLottie?: any;
8
- customParameters?: string | null;
9
- }
10
- export declare const defaultIdentityVerificationConfig: IdentityVerificationConfig;
11
- export interface LivenessConfig {
12
- active: boolean;
13
- icon?: string;
14
- headerMode?: number;
15
- passive?: boolean | null;
16
- compareCustomerClientId?: string | null;
17
- showCloseButton?: boolean;
18
- uploadFullFrame?: boolean;
19
- subtitle?: string | null;
20
- deviceType?: DEVICE_TYPE | null;
21
- customParameters?: string | null;
22
- }
23
- export interface ExtraDocumentConfig {
24
- active: boolean;
25
- icon: string;
26
- headerMode: number;
27
- requestInfoHandler: (params: {
28
- result: any;
29
- }) => {
30
- [key: string]: string;
31
- };
32
- showCloseButton: boolean;
33
- continue?: boolean;
34
- border?: string;
35
- extraText: {
36
- title: string;
37
- frontSide: string;
38
- otherPictures: string;
39
- };
40
- }
41
- export declare const defaultExtraDocumentConfig: ExtraDocumentConfig;
42
- export declare const defaultLivenessConfig: Required<LivenessConfig>;
43
- export interface IdRecognitionConfig {
44
- icon?: string;
45
- needAntiFraud?: boolean;
46
- needOCR?: boolean;
47
- country: CountryCode;
48
- type: IdRecognitionCardType;
49
- needConfirm?: boolean;
50
- displayResultPage?: boolean;
51
- showStatement?: boolean;
52
- headerMode?: number;
53
- blockFraud?: boolean;
54
- showCloseButton?: boolean;
55
- disableTutorial?: boolean;
56
- hotfixIphone14proCameraBlur?: boolean;
57
- uploadFullFrame?: boolean;
58
- disablePassportConfirm?: boolean;
59
- antiFraudIMetalTagValidCountTh?: number | false;
60
- cardTypes?: string[];
61
- cardTypeConfigs?: object[];
62
- captureTimeout?: number;
63
- resultImageFormat?: 'jpg' | 'png';
64
- confirmPageEnabled?: boolean;
65
- isFraudIntroEnable?: boolean;
66
- deviceType?: DEVICE_TYPE | null;
67
- customParameters?: string | null;
68
- }
69
- export interface GetCardTypeAndCountryConfig {
70
- supportCountries: CountryCode[];
71
- defaultCountry: CountryCode;
72
- supportCardTypes: (country: CountryCode) => {
73
- cardType: IdRecognitionCardType;
74
- display: string;
75
- config?: object;
76
- }[];
77
- }
78
- export declare const defaultIdRecognitionConfig: Required<IdRecognitionConfig>;
79
- export interface OcrEngineConfig {
80
- enableManualUpload: boolean;
81
- fraudRetryTimes: number;
82
- fraudTimeout: number;
83
- fraudMaxFps: number;
84
- ocrMaxFps: number;
85
- expiredIn?: number;
86
- captureTimeout?: number;
87
- }
88
- export interface LivenessEngineConfig {
89
- fasThreshold: number;
90
- fasTimeout: number;
91
- fasMaxFps: number;
92
- }
93
- export interface ScanViewItem {
94
- document_type: string;
95
- content: ContentItem[];
96
- success: ScanViewSuccess;
97
- line: ScanViewLine;
98
- border: ScanViewBorder;
99
- }
100
- export interface ContentItem {
101
- type: 'text' | 'svg';
102
- content: string;
103
- color: string | null;
104
- opacity: number;
105
- }
106
- interface ScanViewSuccess {
107
- enable: boolean;
108
- color: string;
109
- opacity: number;
110
- }
111
- interface ScanViewLine {
112
- enable: boolean;
113
- color: string;
114
- gradient: ScanViewGradient;
115
- }
116
- interface ScanViewGradient {
117
- enable: boolean;
118
- color: string;
119
- opacity: number;
120
- }
121
- interface ScanViewBorder {
122
- enable: boolean;
123
- type: 'cornered' | 'bordered';
124
- color: string;
125
- opacity: number;
126
- }
127
- export {};
1
+ import { MlEngineConfig } from '@authme/engine';
2
+ import { CountryCode, IdRecognitionCardType } from '@authme/id-recognition';
3
+ import { DEVICE_TYPE } from '@authme/util';
4
+ export interface IdentityVerificationConfig extends MlEngineConfig {
5
+ canvas?: HTMLCanvasElement;
6
+ OCRIdcardResultFormat?: 'default' | 'splitDateAndAddress';
7
+ loadingLottie?: any;
8
+ customParameters?: string | null;
9
+ }
10
+ export declare const defaultIdentityVerificationConfig: IdentityVerificationConfig;
11
+ export interface LivenessConfig {
12
+ active: boolean;
13
+ icon?: string;
14
+ headerMode?: number;
15
+ passive?: boolean | null;
16
+ compareCustomerClientId?: string | null;
17
+ showCloseButton?: boolean;
18
+ uploadFullFrame?: boolean;
19
+ subtitle?: string | null;
20
+ deviceType?: DEVICE_TYPE | null;
21
+ customParameters?: string | null;
22
+ }
23
+ export interface ExtraDocumentConfig {
24
+ active: boolean;
25
+ icon: string;
26
+ headerMode: number;
27
+ requestInfoHandler: (params: {
28
+ result: any;
29
+ }) => {
30
+ [key: string]: string;
31
+ };
32
+ showCloseButton: boolean;
33
+ continue?: boolean;
34
+ border?: string;
35
+ extraText: {
36
+ title: string;
37
+ frontSide: string;
38
+ otherPictures: string;
39
+ };
40
+ }
41
+ export declare const defaultExtraDocumentConfig: ExtraDocumentConfig;
42
+ export declare const defaultLivenessConfig: Required<LivenessConfig>;
43
+ export interface IdRecognitionConfig {
44
+ icon?: string;
45
+ needAntiFraud?: boolean;
46
+ needOCR?: boolean;
47
+ country: CountryCode;
48
+ type: IdRecognitionCardType;
49
+ needConfirm?: boolean;
50
+ displayResultPage?: boolean;
51
+ showStatement?: boolean;
52
+ headerMode?: number;
53
+ blockFraud?: boolean;
54
+ showCloseButton?: boolean;
55
+ disableTutorial?: boolean;
56
+ hotfixIphone14proCameraBlur?: boolean;
57
+ uploadFullFrame?: boolean;
58
+ disablePassportConfirm?: boolean;
59
+ antiFraudIMetalTagValidCountTh?: number | false;
60
+ cardTypes?: string[];
61
+ cardTypeConfigs?: object[];
62
+ captureTimeout?: number;
63
+ resultImageFormat?: 'jpg' | 'png';
64
+ confirmPageEnabled?: boolean;
65
+ isFraudIntroEnable?: boolean;
66
+ deviceType?: DEVICE_TYPE | null;
67
+ customParameters?: string | null;
68
+ }
69
+ export interface GetCardTypeAndCountryConfig {
70
+ supportCountries: CountryCode[];
71
+ defaultCountry: CountryCode;
72
+ supportCardTypes: (country: CountryCode) => {
73
+ cardType: IdRecognitionCardType;
74
+ display: string;
75
+ config?: object;
76
+ }[];
77
+ }
78
+ export declare const defaultIdRecognitionConfig: Required<IdRecognitionConfig>;
79
+ export interface OcrEngineConfig {
80
+ enableManualUpload: boolean;
81
+ fraudRetryTimes: number;
82
+ fraudTimeout: number;
83
+ fraudMaxFps: number;
84
+ ocrMaxFps: number;
85
+ expiredIn?: number;
86
+ captureTimeout?: number;
87
+ }
88
+ export interface LivenessEngineConfig {
89
+ fasThreshold: number;
90
+ fasTimeout: number;
91
+ fasMaxFps: number;
92
+ }
93
+ export interface ScanViewItem {
94
+ document_type: string;
95
+ content: ContentItem[];
96
+ success: ScanViewSuccess;
97
+ line: ScanViewLine;
98
+ border: ScanViewBorder;
99
+ }
100
+ export interface ContentItem {
101
+ type: 'text' | 'svg';
102
+ content: string;
103
+ color: string | null;
104
+ opacity: number;
105
+ }
106
+ interface ScanViewSuccess {
107
+ enable: boolean;
108
+ color: string;
109
+ opacity: number;
110
+ }
111
+ interface ScanViewLine {
112
+ enable: boolean;
113
+ color: string;
114
+ gradient: ScanViewGradient;
115
+ }
116
+ interface ScanViewGradient {
117
+ enable: boolean;
118
+ color: string;
119
+ opacity: number;
120
+ }
121
+ interface ScanViewBorder {
122
+ enable: boolean;
123
+ type: 'cornered' | 'bordered';
124
+ color: string;
125
+ opacity: number;
126
+ }
127
+ export {};
@@ -1 +1 @@
1
- export * from './config.interface';
1
+ export * from './config.interface';
@@ -1,50 +1,50 @@
1
- import { CountryCode, IdRecognitionCardType } from '@authme/id-recognition';
2
- export declare type AuthmeLivenessResult = {
3
- isSuccess: true;
4
- message: unknown;
5
- } | {
6
- isSuccess: false;
7
- code: string;
8
- message: string;
9
- cause?: any;
10
- data?: any;
11
- };
12
- export interface AuthmeOCRResult {
13
- isSuccess: boolean;
14
- message: string;
15
- data: any;
16
- code?: string | number;
17
- cause?: any;
18
- scanId?: string;
19
- frontImage?: string | null;
20
- backImage?: string | null;
21
- frontCropImage?: string | null;
22
- backCropImage?: string | null;
23
- modifiedData?: AuthmeOCRModifiedData;
24
- }
25
- export interface AuthmeOCRModifiedData {
26
- [key: string]: {
27
- isModified: boolean;
28
- value: string;
29
- };
30
- }
31
- export interface AuthmeResult {
32
- isSuccess: boolean;
33
- message: string;
34
- }
35
- export interface AuthmeExtraDocumentResult extends AuthmeResult {
36
- data: {
37
- id?: string[];
38
- };
39
- }
40
- export declare type CardTypeAndCountry = {
41
- hasResult: true;
42
- country: CountryCode;
43
- cardType: IdRecognitionCardType;
44
- config: any;
45
- } | {
46
- hasResult: false;
47
- country?: unknown;
48
- cardType?: unknown;
49
- config?: unknown;
50
- };
1
+ import { CountryCode, IdRecognitionCardType } from '@authme/id-recognition';
2
+ export type AuthmeLivenessResult = {
3
+ isSuccess: true;
4
+ message: unknown;
5
+ } | {
6
+ isSuccess: false;
7
+ code: string;
8
+ message: string;
9
+ cause?: any;
10
+ data?: any;
11
+ };
12
+ export interface AuthmeOCRResult {
13
+ isSuccess: boolean;
14
+ message: string;
15
+ data: any;
16
+ code?: string | number;
17
+ cause?: any;
18
+ scanId?: string;
19
+ frontImage?: string | null;
20
+ backImage?: string | null;
21
+ frontCropImage?: string | null;
22
+ backCropImage?: string | null;
23
+ modifiedData?: AuthmeOCRModifiedData;
24
+ }
25
+ export interface AuthmeOCRModifiedData {
26
+ [key: string]: {
27
+ isModified: boolean;
28
+ value: string;
29
+ };
30
+ }
31
+ export interface AuthmeResult {
32
+ isSuccess: boolean;
33
+ message: string;
34
+ }
35
+ export interface AuthmeExtraDocumentResult extends AuthmeResult {
36
+ data: {
37
+ id?: string[];
38
+ };
39
+ }
40
+ export type CardTypeAndCountry = {
41
+ hasResult: true;
42
+ country: CountryCode;
43
+ cardType: IdRecognitionCardType;
44
+ config: any;
45
+ } | {
46
+ hasResult: false;
47
+ country?: unknown;
48
+ cardType?: unknown;
49
+ config?: unknown;
50
+ };