@authme/identity-verification 2.7.4 → 2.8.1-patch.1
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/index.cjs +867 -160
- package/index.js +871 -164
- package/package.json +6 -6
- package/src/lib/identity-verification-feature-identity-verification.d.ts +7 -2
- package/src/lib/interface/config.interface.d.ts +3 -0
- package/src/lib/interface/result.model.d.ts +16 -13
- package/src/lib/ui/ocr-flow.d.ts +4 -0
- package/src/lib/ui/ocr.ui.d.ts +1 -3
- package/src/lib/v2/component/frameView.d.ts +1 -1
- package/src/lib/v2/utilities/index.d.ts +14 -0
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authme/identity-verification",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1-patch.1",
|
|
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.
|
|
9
|
-
"@authme/engine": "2.
|
|
10
|
-
"@authme/id-recognition": "2.
|
|
11
|
-
"@authme/util": "2.
|
|
12
|
-
"@authme/liveness": "2.
|
|
8
|
+
"@authme/core": "2.8.1-patch.1",
|
|
9
|
+
"@authme/engine": "2.8.1-patch.1",
|
|
10
|
+
"@authme/id-recognition": "2.8.1-patch.1",
|
|
11
|
+
"@authme/util": "2.8.1-patch.1",
|
|
12
|
+
"@authme/liveness": "2.8.1-patch.1"
|
|
13
13
|
},
|
|
14
14
|
"module": "./index.js",
|
|
15
15
|
"main": "./index.cjs",
|
|
@@ -20,11 +20,11 @@ export declare class AuthmeIdentityVerification extends AuthmeFunctionModule {
|
|
|
20
20
|
extraDocument(userConfig?: Partial<ExtraDocumentConfig>): Promise<AuthmeExtraDocumentResult>;
|
|
21
21
|
IdRecognition(userConfig: IdRecognitionConfig): Promise<AuthmeOCRResult>;
|
|
22
22
|
confirmOCRResult(data: {
|
|
23
|
-
scanId: string;
|
|
23
|
+
scanId: string | undefined;
|
|
24
24
|
details: {
|
|
25
25
|
[key: string]: string;
|
|
26
26
|
};
|
|
27
|
-
}): Promise<
|
|
27
|
+
}): Promise<AuthmeOCRResult>;
|
|
28
28
|
auth(authParams: {
|
|
29
29
|
cert: string;
|
|
30
30
|
authToken: string;
|
|
@@ -32,4 +32,9 @@ export declare class AuthmeIdentityVerification extends AuthmeFunctionModule {
|
|
|
32
32
|
}): Promise<boolean>;
|
|
33
33
|
_tearDown(): Promise<void>;
|
|
34
34
|
tearDown(): Promise<void>;
|
|
35
|
+
cleanAllModel(): Promise<void>;
|
|
36
|
+
getCustomerState(arg?: {
|
|
37
|
+
waitingTime?: number;
|
|
38
|
+
retryTimes?: number;
|
|
39
|
+
}): Promise<any>;
|
|
35
40
|
}
|
|
@@ -4,6 +4,7 @@ export interface IdentityVerificationConfig extends MlEngineConfig {
|
|
|
4
4
|
canvas?: HTMLCanvasElement;
|
|
5
5
|
OCRIdcardResultFormat?: 'default' | 'splitDateAndAddress';
|
|
6
6
|
loadingLottie?: any;
|
|
7
|
+
customParameters?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const defaultIdentityVerificationConfig: IdentityVerificationConfig;
|
|
9
10
|
export interface LivenessConfig {
|
|
@@ -57,6 +58,8 @@ export interface IdRecognitionConfig {
|
|
|
57
58
|
cardTypes?: string[];
|
|
58
59
|
cardTypeConfigs?: object[];
|
|
59
60
|
captureTimeout?: number;
|
|
61
|
+
resultImageFormat?: 'jpg' | 'png';
|
|
62
|
+
confirmPageEnabled?: boolean;
|
|
60
63
|
}
|
|
61
64
|
export interface GetCardTypeAndCountryConfig {
|
|
62
65
|
supportCountries: CountryCode[];
|
|
@@ -8,22 +8,25 @@ export declare type AuthmeLivenessResult = {
|
|
|
8
8
|
message: string;
|
|
9
9
|
cause?: any;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
isSuccess:
|
|
11
|
+
export interface AuthmeOCRResult {
|
|
12
|
+
isSuccess: boolean;
|
|
13
13
|
message: string;
|
|
14
|
-
|
|
14
|
+
data: any;
|
|
15
|
+
code?: string | number;
|
|
15
16
|
cause?: any;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
scanId?: string;
|
|
18
|
+
frontImage?: string | null;
|
|
19
|
+
backImage?: string | null;
|
|
20
|
+
frontCropImage?: string | null;
|
|
21
|
+
backCropImage?: string | null;
|
|
22
|
+
modifiedData?: AuthmeOCRModifiedData;
|
|
23
|
+
}
|
|
24
|
+
export interface AuthmeOCRModifiedData {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
isModified: boolean;
|
|
27
|
+
value: string;
|
|
25
28
|
};
|
|
26
|
-
}
|
|
29
|
+
}
|
|
27
30
|
export interface AuthmeResult {
|
|
28
31
|
isSuccess: boolean;
|
|
29
32
|
message: string;
|
package/src/lib/ui/ocr-flow.d.ts
CHANGED
|
@@ -105,6 +105,10 @@ export declare function startOCR(config: {
|
|
|
105
105
|
details: {
|
|
106
106
|
[key: string]: string;
|
|
107
107
|
};
|
|
108
|
+
frontImage?: string | null;
|
|
109
|
+
backImage?: string | null;
|
|
110
|
+
frontCropImage?: string | null;
|
|
111
|
+
backCropImage?: string | null;
|
|
108
112
|
}>;
|
|
109
113
|
onDestroy: () => Promise<void>;
|
|
110
114
|
getCardMatchROI?: () => Promise<Point[]>;
|
package/src/lib/ui/ocr.ui.d.ts
CHANGED
|
@@ -97,9 +97,7 @@ export declare function renderConfirmUI({ cardType, items, options: { headerIcon
|
|
|
97
97
|
headerIcon?: string;
|
|
98
98
|
translate?: (str: string) => string;
|
|
99
99
|
};
|
|
100
|
-
}): Promise<
|
|
101
|
-
[column: string]: string;
|
|
102
|
-
}>;
|
|
100
|
+
}): Promise<any>;
|
|
103
101
|
declare type BorderType = 'cornered' | 'bordered';
|
|
104
102
|
export declare const renderOCRMask: (params: {
|
|
105
103
|
cardPoints: Point[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FacingMode } from '../interface/index';
|
|
2
|
-
export declare function initFrameView(cardPoints: any, scanId: string, faceMode: FacingMode, scanView: any, cardType: any, cardTypeConfig: any, setBorderType: any, setCardBorderColor: any, setBorderSuccess: any): Promise<void>;
|
|
2
|
+
export declare function initFrameView(cardPoints: any, scanId: string, faceMode: FacingMode, scanView: any, cardType: any, cardTypeConfig: any, setBorderType: any, setCardBorderColor: any, setBorderSuccess: any, shouldEncrypt: boolean, encryptDataBase64: any): Promise<void>;
|
|
@@ -6,3 +6,17 @@ export declare const countdownTimer: (time: number, doSomething?: any) => {
|
|
|
6
6
|
init: () => void;
|
|
7
7
|
end: () => boolean;
|
|
8
8
|
};
|
|
9
|
+
export declare const blobToBase64: (image: Blob) => Promise<string>;
|
|
10
|
+
export declare const blobToImageBase64: (image: Blob) => Promise<any>;
|
|
11
|
+
export declare const result2ModifiedData: (result: any, modifiedResult?: {
|
|
12
|
+
[key: string]: {
|
|
13
|
+
isModified: boolean;
|
|
14
|
+
value: string;
|
|
15
|
+
};
|
|
16
|
+
}) => any;
|
|
17
|
+
export declare const modifiedData2Result: (modifiedResult: {
|
|
18
|
+
[key: string]: {
|
|
19
|
+
isModified: boolean;
|
|
20
|
+
value: string;
|
|
21
|
+
};
|
|
22
|
+
}) => any;
|