@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.
- package/assets/locale/en_US.json +10 -0
- package/assets/locale/ja_JP.json +10 -0
- package/assets/locale/zh_Hant_TW.json +11 -0
- package/assets/styles/style.css +48 -1
- package/index.cjs.d.ts +1 -0
- package/{index.cjs → index.cjs.js} +4904 -4834
- package/index.esm.d.ts +1 -0
- package/{index.js → index.esm.js} +4904 -4828
- package/package.json +6 -13
- package/src/index.d.ts +5 -5
- package/src/lib/identity-verification-feature-identity-verification.d.ts +42 -42
- package/src/lib/interface/config.interface.d.ts +127 -127
- package/src/lib/interface/index.d.ts +1 -1
- package/src/lib/interface/result.model.d.ts +50 -50
- 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_rotate_down.d.ts +396 -396
- package/src/lib/lottie/card_rotate_left.d.ts +396 -396
- package/src/lib/lottie/card_rotate_right.d.ts +396 -396
- package/src/lib/lottie/card_rotate_up.d.ts +412 -412
- package/src/lib/lottie/card_ud.d.ts +182 -182
- package/src/lib/lottie/circle_large_to_sm_mask.d.ts +595 -595
- package/src/lib/lottie/circle_sm_to_large_mask.d.ts +595 -595
- package/src/lib/lottie/fraudScanIntroPageStep1.d.ts +1449 -1449
- package/src/lib/lottie/index.d.ts +16 -16
- package/src/lib/lottie/scan.d.ts +566 -566
- package/src/lib/lottie/success.d.ts +949 -949
- package/src/lib/lottie/tutorial.d.ts +978 -978
- package/src/lib/module/extra.module.d.ts +7 -7
- package/src/lib/module/liveness-verify.module.d.ts +13 -13
- package/src/lib/module/liveness.module.d.ts +14 -14
- package/src/lib/module/mrz.module.d.ts +14 -14
- package/src/lib/module/ocr.module.d.ts +16 -16
- package/src/lib/operator/index.d.ts +19 -19
- package/src/lib/service/card-type-and-country.service.d.ts +5 -5
- package/src/lib/service/event-tracking.service.d.ts +28 -28
- package/src/lib/service/liveness.service.d.ts +10 -10
- package/src/lib/service/ocr.service.d.ts +9 -9
- package/src/lib/status/scan-view.status.d.ts +3 -3
- package/src/lib/ui/basic/index.d.ts +18 -18
- package/src/lib/ui/card-type-and-country.ui.d.ts +3 -3
- package/src/lib/ui/default-images.d.ts +2 -2
- package/src/lib/ui/extra-flow.d.ts +8 -8
- package/src/lib/ui/extra.ui.d.ts +17 -17
- package/src/lib/ui/index.d.ts +5 -5
- package/src/lib/ui/liveness-flow.d.ts +23 -24
- package/src/lib/ui/liveness.ui.d.ts +20 -20
- package/src/lib/ui/ocr-flow.d.ts +118 -118
- package/src/lib/ui/ocr.animate.d.ts +7 -7
- package/src/lib/ui/ocr.ui.d.ts +123 -123
- package/src/lib/ui/shared.d.ts +9 -9
- package/src/lib/ui/ui-init.d.ts +1 -1
- package/src/lib/v2/component/countryCardType.d.ts +3 -3
- package/src/lib/v2/component/frameView.d.ts +2 -2
- package/src/lib/v2/images/index.d.ts +1 -1
- package/src/lib/v2/index.d.ts +6 -6
- package/src/lib/v2/interface/index.d.ts +1 -1
- package/src/lib/v2/thickness.d.ts +22 -73
- package/src/lib/v2/ui/button.d.ts +1 -1
- package/src/lib/v2/ui/confirmPop.d.ts +11 -11
- package/src/lib/v2/ui/fraudScanIntroPage.d.ts +12 -12
- package/src/lib/v2/ui/modal.d.ts +11 -11
- package/src/lib/v2/ui/ocrResultModal.d.ts +13 -13
- package/src/lib/v2/ui/popupView.d.ts +8 -8
- package/src/lib/v2/ui/toast.d.ts +7 -7
- package/src/lib/v2/utilities/index.d.ts +25 -25
- 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.
|
|
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
|
-
"
|
|
17
|
-
|
|
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
|
|
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
|
|
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
|
+
};
|