@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.
- package/assets/locale/en_US.json +28 -1
- package/assets/locale/zh_Hant_TW.json +28 -1
- package/assets/styles/style.css +143 -96
- package/index.cjs +11634 -0
- package/index.js +11610 -0
- package/package.json +14 -14
- package/src/index.d.ts +5 -4
- package/src/lib/identity-verification-feature-identity-verification.d.ts +33 -27
- package/src/lib/interface/config.interface.d.ts +42 -40
- package/src/lib/interface/index.d.ts +1 -1
- package/src/lib/interface/result.model.d.ts +35 -35
- package/src/lib/lottie/arrow_down.d.ts +215 -215
- package/src/lib/lottie/arrow_left.d.ts +215 -215
- package/src/lib/lottie/arrow_right.d.ts +215 -215
- package/src/lib/lottie/arrow_up.d.ts +215 -215
- package/src/lib/lottie/card_lr.d.ts +182 -182
- package/src/lib/lottie/card_ud.d.ts +182 -182
- package/src/lib/lottie/index.d.ts +9 -9
- package/src/lib/lottie/scan.d.ts +562 -562
- package/src/lib/lottie/success.d.ts +946 -946
- package/src/lib/lottie/tutorial.d.ts +1449 -1449
- package/src/lib/module/liveness-verify.module.d.ts +13 -12
- package/src/lib/module/liveness.module.d.ts +14 -12
- package/src/lib/module/mrz.module.d.ts +13 -11
- package/src/lib/module/ocr.module.d.ts +15 -12
- package/src/lib/operator/index.d.ts +16 -16
- package/src/lib/ui/basic.d.ts +13 -13
- package/src/lib/ui/default-images.d.ts +2 -2
- package/src/lib/ui/index.d.ts +3 -3
- package/src/lib/ui/liveness-flow.d.ts +16 -16
- package/src/lib/ui/liveness.ui.d.ts +10 -10
- package/src/lib/ui/ocr-flow.d.ts +73 -73
- package/src/lib/ui/ocr.ui.d.ts +63 -63
- package/src/lib/ui/shared.d.ts +2 -0
- package/src/lib/ui/ui-init.d.ts +1 -1
- package/src/lib/version.d.ts +1 -0
- package/CHANGELOG.md +0 -1053
- package/src/index.js +0 -8
- package/src/index.js.map +0 -1
- package/src/lib/identity-verification-feature-identity-verification.js +0 -122
- package/src/lib/identity-verification-feature-identity-verification.js.map +0 -1
- package/src/lib/interface/config.interface.js +0 -29
- package/src/lib/interface/config.interface.js.map +0 -1
- package/src/lib/interface/index.js +0 -5
- package/src/lib/interface/index.js.map +0 -1
- package/src/lib/interface/result.model.js +0 -3
- package/src/lib/interface/result.model.js.map +0 -1
- package/src/lib/lottie/arrow_down.js +0 -203
- package/src/lib/lottie/arrow_down.js.map +0 -1
- package/src/lib/lottie/arrow_left.js +0 -203
- package/src/lib/lottie/arrow_left.js.map +0 -1
- package/src/lib/lottie/arrow_right.js +0 -203
- package/src/lib/lottie/arrow_right.js.map +0 -1
- package/src/lib/lottie/arrow_up.js +0 -203
- package/src/lib/lottie/arrow_up.js.map +0 -1
- package/src/lib/lottie/card_lr.js +0 -1903
- package/src/lib/lottie/card_lr.js.map +0 -1
- package/src/lib/lottie/card_ud.js +0 -1937
- package/src/lib/lottie/card_ud.js.map +0 -1
- package/src/lib/lottie/index.js +0 -13
- package/src/lib/lottie/index.js.map +0 -1
- package/src/lib/lottie/scan.js +0 -384
- package/src/lib/lottie/scan.js.map +0 -1
- package/src/lib/lottie/success.js +0 -509
- package/src/lib/lottie/success.js.map +0 -1
- package/src/lib/lottie/tutorial.js +0 -3683
- package/src/lib/lottie/tutorial.js.map +0 -1
- package/src/lib/module/liveness-verify.module.js +0 -218
- package/src/lib/module/liveness-verify.module.js.map +0 -1
- package/src/lib/module/liveness.module.js +0 -195
- package/src/lib/module/liveness.module.js.map +0 -1
- package/src/lib/module/mrz.module.js +0 -156
- package/src/lib/module/mrz.module.js.map +0 -1
- package/src/lib/module/ocr.module.js +0 -235
- package/src/lib/module/ocr.module.js.map +0 -1
- package/src/lib/operator/index.js +0 -38
- package/src/lib/operator/index.js.map +0 -1
- package/src/lib/ui/basic.js +0 -59
- package/src/lib/ui/basic.js.map +0 -1
- package/src/lib/ui/default-images.js +0 -6
- package/src/lib/ui/default-images.js.map +0 -1
- package/src/lib/ui/index.js +0 -7
- package/src/lib/ui/index.js.map +0 -1
- package/src/lib/ui/liveness-flow.js +0 -180
- package/src/lib/ui/liveness-flow.js.map +0 -1
- package/src/lib/ui/liveness.ui.js +0 -176
- package/src/lib/ui/liveness.ui.js.map +0 -1
- package/src/lib/ui/ocr-flow.js +0 -700
- package/src/lib/ui/ocr-flow.js.map +0 -1
- package/src/lib/ui/ocr.ui.js +0 -382
- package/src/lib/ui/ocr.ui.js.map +0 -1
- package/src/lib/ui/ui-init.js +0 -7
- 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.
|
|
4
|
-
"
|
|
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
|
+
"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
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
+
};
|