@authme/identity-verification 2.2.0 → 2.2.1-rc.3

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 (93) hide show
  1. package/assets/locale/en_US.json +28 -1
  2. package/assets/locale/zh_Hant_TW.json +28 -1
  3. package/assets/styles/style.css +143 -96
  4. package/index.cjs +11634 -0
  5. package/index.js +11610 -0
  6. package/package.json +14 -14
  7. package/src/index.d.ts +5 -4
  8. package/src/lib/identity-verification-feature-identity-verification.d.ts +33 -27
  9. package/src/lib/interface/config.interface.d.ts +42 -40
  10. package/src/lib/interface/index.d.ts +1 -1
  11. package/src/lib/interface/result.model.d.ts +35 -35
  12. package/src/lib/lottie/arrow_down.d.ts +215 -215
  13. package/src/lib/lottie/arrow_left.d.ts +215 -215
  14. package/src/lib/lottie/arrow_right.d.ts +215 -215
  15. package/src/lib/lottie/arrow_up.d.ts +215 -215
  16. package/src/lib/lottie/card_lr.d.ts +182 -182
  17. package/src/lib/lottie/card_ud.d.ts +182 -182
  18. package/src/lib/lottie/index.d.ts +9 -9
  19. package/src/lib/lottie/scan.d.ts +562 -562
  20. package/src/lib/lottie/success.d.ts +946 -946
  21. package/src/lib/lottie/tutorial.d.ts +1449 -1449
  22. package/src/lib/module/liveness-verify.module.d.ts +13 -12
  23. package/src/lib/module/liveness.module.d.ts +14 -12
  24. package/src/lib/module/mrz.module.d.ts +13 -11
  25. package/src/lib/module/ocr.module.d.ts +15 -12
  26. package/src/lib/operator/index.d.ts +16 -16
  27. package/src/lib/ui/basic.d.ts +13 -13
  28. package/src/lib/ui/default-images.d.ts +2 -2
  29. package/src/lib/ui/index.d.ts +3 -3
  30. package/src/lib/ui/liveness-flow.d.ts +16 -16
  31. package/src/lib/ui/liveness.ui.d.ts +10 -10
  32. package/src/lib/ui/ocr-flow.d.ts +73 -73
  33. package/src/lib/ui/ocr.ui.d.ts +63 -63
  34. package/src/lib/ui/shared.d.ts +2 -0
  35. package/src/lib/ui/ui-init.d.ts +1 -1
  36. package/src/lib/version.d.ts +1 -0
  37. package/CHANGELOG.md +0 -1053
  38. package/src/index.js +0 -8
  39. package/src/index.js.map +0 -1
  40. package/src/lib/identity-verification-feature-identity-verification.js +0 -122
  41. package/src/lib/identity-verification-feature-identity-verification.js.map +0 -1
  42. package/src/lib/interface/config.interface.js +0 -29
  43. package/src/lib/interface/config.interface.js.map +0 -1
  44. package/src/lib/interface/index.js +0 -5
  45. package/src/lib/interface/index.js.map +0 -1
  46. package/src/lib/interface/result.model.js +0 -3
  47. package/src/lib/interface/result.model.js.map +0 -1
  48. package/src/lib/lottie/arrow_down.js +0 -203
  49. package/src/lib/lottie/arrow_down.js.map +0 -1
  50. package/src/lib/lottie/arrow_left.js +0 -203
  51. package/src/lib/lottie/arrow_left.js.map +0 -1
  52. package/src/lib/lottie/arrow_right.js +0 -203
  53. package/src/lib/lottie/arrow_right.js.map +0 -1
  54. package/src/lib/lottie/arrow_up.js +0 -203
  55. package/src/lib/lottie/arrow_up.js.map +0 -1
  56. package/src/lib/lottie/card_lr.js +0 -1903
  57. package/src/lib/lottie/card_lr.js.map +0 -1
  58. package/src/lib/lottie/card_ud.js +0 -1937
  59. package/src/lib/lottie/card_ud.js.map +0 -1
  60. package/src/lib/lottie/index.js +0 -13
  61. package/src/lib/lottie/index.js.map +0 -1
  62. package/src/lib/lottie/scan.js +0 -384
  63. package/src/lib/lottie/scan.js.map +0 -1
  64. package/src/lib/lottie/success.js +0 -509
  65. package/src/lib/lottie/success.js.map +0 -1
  66. package/src/lib/lottie/tutorial.js +0 -3683
  67. package/src/lib/lottie/tutorial.js.map +0 -1
  68. package/src/lib/module/liveness-verify.module.js +0 -218
  69. package/src/lib/module/liveness-verify.module.js.map +0 -1
  70. package/src/lib/module/liveness.module.js +0 -195
  71. package/src/lib/module/liveness.module.js.map +0 -1
  72. package/src/lib/module/mrz.module.js +0 -156
  73. package/src/lib/module/mrz.module.js.map +0 -1
  74. package/src/lib/module/ocr.module.js +0 -235
  75. package/src/lib/module/ocr.module.js.map +0 -1
  76. package/src/lib/operator/index.js +0 -38
  77. package/src/lib/operator/index.js.map +0 -1
  78. package/src/lib/ui/basic.js +0 -59
  79. package/src/lib/ui/basic.js.map +0 -1
  80. package/src/lib/ui/default-images.js +0 -6
  81. package/src/lib/ui/default-images.js.map +0 -1
  82. package/src/lib/ui/index.js +0 -7
  83. package/src/lib/ui/index.js.map +0 -1
  84. package/src/lib/ui/liveness-flow.js +0 -180
  85. package/src/lib/ui/liveness-flow.js.map +0 -1
  86. package/src/lib/ui/liveness.ui.js +0 -176
  87. package/src/lib/ui/liveness.ui.js.map +0 -1
  88. package/src/lib/ui/ocr-flow.js +0 -700
  89. package/src/lib/ui/ocr-flow.js.map +0 -1
  90. package/src/lib/ui/ocr.ui.js +0 -382
  91. package/src/lib/ui/ocr.ui.js.map +0 -1
  92. package/src/lib/ui/ui-init.js +0 -7
  93. package/src/lib/ui/ui-init.js.map +0 -1
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@authme/identity-verification",
3
- "version": "2.2.0",
4
- "dependencies": {
3
+ "version": "2.2.1-rc.3",
4
+ "peerDependencies": {
5
+ "core-js": "^3.6.0",
5
6
  "lottie-web": "^5.9.2",
6
- "rxjs": "~7.4.0"
7
+ "rxjs": "^7.4.0",
8
+ "@authme/core": "2.2.1-rc.3",
9
+ "@authme/engine": "2.2.1-rc.3",
10
+ "@authme/id-recognition": "2.2.1-rc.3",
11
+ "@authme/util": "2.2.1-rc.3",
12
+ "@authme/liveness": "2.2.1-rc.3"
7
13
  },
8
- "main": "./src/index.js",
9
- "typings": "./src/index.d.ts",
10
- "peerDependencies": {
11
- "@authme/core": "2.2.0",
12
- "@authme/util": "2.2.0",
13
- "three": "^0.136.0",
14
- "@authme/engine": "2.2.0",
15
- "@authme/id-recognition": "2.2.0",
16
- "@authme/liveness": "2.2.0",
17
- "tslib": "^2.3.0"
18
- }
14
+ "module": "./index.js",
15
+ "main": "./index.cjs",
16
+ "type": "module",
17
+ "types": "./src/index.d.ts",
18
+ "dependencies": {}
19
19
  }
package/src/index.d.ts CHANGED
@@ -1,4 +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';
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,27 +1,33 @@
1
- import { AuthmeFunctionModule } from '@authme/engine';
2
- import { IdentityVerificationConfig, IdRecognitionConfig, LivenessConfig, GetCardTypeAndCountryConfig } from './interface';
3
- import { AuthmeLivenessResult, AuthmeOCRResult, CardTypeAndCountry } from './interface/result.model';
4
- export declare function identityVerificationFeatureIdentityVerification(): string;
5
- export declare class AuthmeIdentityVerification extends AuthmeFunctionModule {
6
- private engine;
7
- private livenessModule;
8
- private livenessVerifyModule;
9
- private isAuth;
10
- private ocrModule;
11
- private mrzModule;
12
- init(config: IdentityVerificationConfig): Promise<void>;
13
- liveness(userConfig?: Partial<LivenessConfig>): Promise<AuthmeLivenessResult>;
14
- livenessVerify(userConfig: LivenessConfig): Promise<AuthmeLivenessResult>;
15
- getCardTypeAndCountry(userConfig: Partial<GetCardTypeAndCountryConfig>): Promise<CardTypeAndCountry>;
16
- IdRecognition(userConfig: IdRecognitionConfig): Promise<AuthmeOCRResult>;
17
- confirmOCRResult(data: {
18
- scanId: string;
19
- details: {
20
- [key: string]: string;
21
- };
22
- }): Promise<boolean>;
23
- auth(authParams: {
24
- cert: string;
25
- authToken: string;
26
- }): Promise<boolean>;
27
- }
1
+ import { AuthmeFunctionModule } from '@authme/engine';
2
+ import { IdentityVerificationConfig, IdRecognitionConfig, LivenessConfig, GetCardTypeAndCountryConfig } from './interface';
3
+ import { AuthmeLivenessResult, AuthmeOCRResult, CardTypeAndCountry } from './interface/result.model';
4
+ export declare function identityVerificationFeatureIdentityVerification(): string;
5
+ export declare class AuthmeIdentityVerification extends AuthmeFunctionModule {
6
+ private engine;
7
+ private livenessModule;
8
+ private livenessVerifyModule;
9
+ private isAuth;
10
+ private ocrModule;
11
+ private mrzModule;
12
+ private tearDownPromise;
13
+ preloadAsync(modules: ('OCR' | 'ANTI_FRAUD' | 'MRZ' | 'LIVENESS')[]): Promise<void>;
14
+ preloadBackground(modules: ('OCR' | 'ANTI_FRAUD' | 'MRZ' | 'LIVENESS')[]): void;
15
+ init(config: IdentityVerificationConfig): Promise<void>;
16
+ liveness(userConfig?: Partial<LivenessConfig>): Promise<AuthmeLivenessResult>;
17
+ livenessVerify(userConfig: LivenessConfig): Promise<AuthmeLivenessResult>;
18
+ getCardTypeAndCountry(userConfig: Partial<GetCardTypeAndCountryConfig>): Promise<CardTypeAndCountry>;
19
+ IdRecognition(userConfig: IdRecognitionConfig): Promise<AuthmeOCRResult>;
20
+ confirmOCRResult(data: {
21
+ scanId: string;
22
+ details: {
23
+ [key: string]: string;
24
+ };
25
+ }): Promise<boolean>;
26
+ auth(authParams: {
27
+ cert: string;
28
+ authToken: string;
29
+ showLoadingUI?: boolean;
30
+ }): Promise<boolean>;
31
+ _tearDown(): Promise<void>;
32
+ tearDown(): Promise<void>;
33
+ }
@@ -1,40 +1,42 @@
1
- import { MlEngineConfig } from '@authme/engine';
2
- import { CountryCode, IdRecognitionCardType } from '@authme/id-recognition';
3
- export interface IdentityVerificationConfig extends MlEngineConfig {
4
- canvas?: HTMLCanvasElement;
5
- }
6
- export declare const defaultIdentityVerificationConfig: IdentityVerificationConfig;
7
- export interface LivenessConfig {
8
- active: boolean;
9
- icon?: string;
10
- showIntroPage?: boolean;
11
- headerMode?: number;
12
- }
13
- export declare const defaultLivenessConfig: Required<LivenessConfig>;
14
- export interface IdRecognitionConfig {
15
- icon?: string;
16
- needAntiFraud?: boolean;
17
- needOCR?: boolean;
18
- country: CountryCode;
19
- type: IdRecognitionCardType;
20
- needConfirm?: boolean;
21
- displayResultPage?: boolean;
22
- showStatement?: boolean;
23
- headerMode?: number;
24
- }
25
- export interface GetCardTypeAndCountryConfig {
26
- supportCountries: CountryCode[];
27
- supportCardTypes: (country: CountryCode) => IdRecognitionCardType[];
28
- }
29
- export declare const defaultIdRecognitionConfig: Required<IdRecognitionConfig>;
30
- export interface OcrEngineConfig {
31
- enableManualUpload: boolean;
32
- fraudRetryTimes: number;
33
- fraudTimeout: number;
34
- fraudMaxFps: number;
35
- }
36
- export interface LivenessEngineConfig {
37
- fasThreshold: number;
38
- fasTimeout: number;
39
- fasMaxFps: number;
40
- }
1
+ import { MlEngineConfig } from '@authme/engine';
2
+ import { CountryCode, IdRecognitionCardType } from '@authme/id-recognition';
3
+ export interface IdentityVerificationConfig extends MlEngineConfig {
4
+ canvas?: HTMLCanvasElement;
5
+ }
6
+ export declare const defaultIdentityVerificationConfig: IdentityVerificationConfig;
7
+ export interface LivenessConfig {
8
+ active: boolean;
9
+ icon?: string;
10
+ showIntroPage?: boolean;
11
+ headerMode?: number;
12
+ }
13
+ export declare const defaultLivenessConfig: Required<LivenessConfig>;
14
+ export interface IdRecognitionConfig {
15
+ icon?: string;
16
+ needAntiFraud?: boolean;
17
+ needOCR?: boolean;
18
+ country: CountryCode;
19
+ type: IdRecognitionCardType;
20
+ needConfirm?: boolean;
21
+ displayResultPage?: boolean;
22
+ showStatement?: boolean;
23
+ headerMode?: number;
24
+ blockFraud?: boolean;
25
+ }
26
+ export interface GetCardTypeAndCountryConfig {
27
+ supportCountries: CountryCode[];
28
+ supportCardTypes: (country: CountryCode) => IdRecognitionCardType[];
29
+ }
30
+ export declare const defaultIdRecognitionConfig: Required<IdRecognitionConfig>;
31
+ export interface OcrEngineConfig {
32
+ enableManualUpload: boolean;
33
+ fraudRetryTimes: number;
34
+ fraudTimeout: number;
35
+ fraudMaxFps: number;
36
+ expiredIn?: number;
37
+ }
38
+ export interface LivenessEngineConfig {
39
+ fasThreshold: number;
40
+ fasTimeout: number;
41
+ fasMaxFps: number;
42
+ }
@@ -1 +1 @@
1
- export * from './config.interface';
1
+ export * from './config.interface';
@@ -1,35 +1,35 @@
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
- };
11
- export declare type AuthmeOCRResult = {
12
- isSuccess: false;
13
- message: string;
14
- code: string;
15
- cause?: any;
16
- data: unknown;
17
- } | {
18
- isSuccess: true;
19
- message: string;
20
- data: {
21
- scanId: string;
22
- details: {
23
- [key: string]: string;
24
- };
25
- };
26
- };
27
- export declare type CardTypeAndCountry = {
28
- hasResult: true;
29
- country: CountryCode;
30
- cardType: IdRecognitionCardType;
31
- } | {
32
- hasResult: false;
33
- country?: unknown;
34
- cardType?: unknown;
35
- };
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
+ };
11
+ export declare type AuthmeOCRResult = {
12
+ isSuccess: false;
13
+ message: string;
14
+ code: string;
15
+ cause?: any;
16
+ data: unknown;
17
+ } | {
18
+ isSuccess: true;
19
+ message: string;
20
+ data: {
21
+ scanId: string;
22
+ details: {
23
+ [key: string]: string;
24
+ };
25
+ };
26
+ };
27
+ export declare type CardTypeAndCountry = {
28
+ hasResult: true;
29
+ country: CountryCode;
30
+ cardType: IdRecognitionCardType;
31
+ } | {
32
+ hasResult: false;
33
+ country?: unknown;
34
+ cardType?: unknown;
35
+ };