@authme/id-recognition 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/index.cjs.d.ts +1 -0
- package/{index.cjs → index.cjs.js} +69 -102
- package/index.esm.d.ts +1 -0
- package/{index.js → index.esm.js} +62 -93
- package/package.json +6 -11
- package/src/index.d.ts +7 -7
- package/src/lib/data-access/api.d.ts +93 -93
- package/src/lib/data-access/index.d.ts +1 -1
- package/src/lib/enum/id-recognition.enum.d.ts +66 -66
- package/src/lib/enum/index.d.ts +1 -1
- package/src/lib/interface/api-response.interface.d.ts +65 -65
- package/src/lib/interface/id-recognition-type.interface.d.ts +79 -79
- package/src/lib/interface/index.d.ts +2 -2
- package/src/lib/model/dto.model.d.ts +27 -27
- package/src/lib/model/id-type.enum.d.ts +13 -13
- package/src/lib/model/index.d.ts +2 -2
- package/src/lib/modules-id-recognition-feature-id-recognition.d.ts +27 -25
- package/src/lib/util.d.ts +12 -12
- package/src/lib/version.d.ts +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export interface IdRecognitionResponse {
|
|
2
|
-
id: string;
|
|
3
|
-
details: {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export
|
|
8
|
-
export interface InitScanResponse {
|
|
9
|
-
scanId: string;
|
|
10
|
-
expiredIn: number;
|
|
11
|
-
shouldEncrypt: boolean;
|
|
12
|
-
parameters: {
|
|
13
|
-
enableManualUpload: boolean;
|
|
14
|
-
fraudRetryTimes: number;
|
|
15
|
-
fraudTimeout: number;
|
|
16
|
-
fraudMaxFps: number;
|
|
17
|
-
pubKey: string;
|
|
18
|
-
fraud?: {
|
|
19
|
-
collectAllFrames: boolean;
|
|
20
|
-
maxFps: number;
|
|
21
|
-
retryTimes: number;
|
|
22
|
-
stages: Array<unknown>;
|
|
23
|
-
timeout: number;
|
|
24
|
-
totalTimeout: number;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
}
|
|
1
|
+
export interface IdRecognitionResponse {
|
|
2
|
+
id: string;
|
|
3
|
+
details: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export type IdRecognitionInfoConfirmRequest = IdRecognitionResponse;
|
|
8
|
+
export interface InitScanResponse {
|
|
9
|
+
scanId: string;
|
|
10
|
+
expiredIn: number;
|
|
11
|
+
shouldEncrypt: boolean;
|
|
12
|
+
parameters: {
|
|
13
|
+
enableManualUpload: boolean;
|
|
14
|
+
fraudRetryTimes: number;
|
|
15
|
+
fraudTimeout: number;
|
|
16
|
+
fraudMaxFps: number;
|
|
17
|
+
pubKey: string;
|
|
18
|
+
fraud?: {
|
|
19
|
+
collectAllFrames: boolean;
|
|
20
|
+
maxFps: number;
|
|
21
|
+
retryTimes: number;
|
|
22
|
+
stages: Array<unknown>;
|
|
23
|
+
timeout: number;
|
|
24
|
+
totalTimeout: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export declare enum IdType {
|
|
2
|
-
IdCard = "IDCard",
|
|
3
|
-
DriverLicense = "DriverLicense",
|
|
4
|
-
HealthCard = "HealthCard",
|
|
5
|
-
Passport = "Passport"
|
|
6
|
-
}
|
|
7
|
-
export interface IdConfig {
|
|
8
|
-
front: boolean;
|
|
9
|
-
back: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const IdTypeConfig: {
|
|
12
|
-
[key: string]: IdConfig;
|
|
13
|
-
};
|
|
1
|
+
export declare enum IdType {
|
|
2
|
+
IdCard = "IDCard",
|
|
3
|
+
DriverLicense = "DriverLicense",
|
|
4
|
+
HealthCard = "HealthCard",
|
|
5
|
+
Passport = "Passport"
|
|
6
|
+
}
|
|
7
|
+
export interface IdConfig {
|
|
8
|
+
front: boolean;
|
|
9
|
+
back: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const IdTypeConfig: {
|
|
12
|
+
[key: string]: IdConfig;
|
|
13
|
+
};
|
package/src/lib/model/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './id-type.enum';
|
|
2
|
-
export * from './dto.model';
|
|
1
|
+
export * from './id-type.enum';
|
|
2
|
+
export * from './dto.model';
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { AuthmeEngineModuleBase, MlEngine } from '@authme/engine';
|
|
2
|
-
import { CardOCRResult, IDCardAntiFraudResult, PassportResult, ResidentCardResult } from './interface';
|
|
3
|
-
import { EAuthMeCardClass, EAuthMeIDCardAntiFraudStage } from './enum';
|
|
4
|
-
export declare class CardOCR extends AuthmeEngineModuleBase<CardOCRResult> {
|
|
5
|
-
private type;
|
|
6
|
-
constructor(engine: MlEngine);
|
|
7
|
-
setType(type: EAuthMeCardClass): Promise<unknown>;
|
|
8
|
-
getType(): EAuthMeCardClass;
|
|
9
|
-
setParams(params: any): Promise<unknown>;
|
|
10
|
-
}
|
|
11
|
-
export interface Point {
|
|
12
|
-
x: number;
|
|
13
|
-
y: number;
|
|
14
|
-
}
|
|
15
|
-
export declare class IdCardAntiFraudService extends AuthmeEngineModuleBase<IDCardAntiFraudResult> {
|
|
16
|
-
constructor(engine: MlEngine);
|
|
17
|
-
setStage(stageList: EAuthMeIDCardAntiFraudStage[]): Promise<unknown>;
|
|
18
|
-
getCardMatchROI(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { AuthmeEngineModuleBase, MlEngine } from '@authme/engine';
|
|
2
|
+
import { CardOCRResult, IDCardAntiFraudResult, PassportResult, ResidentCardResult } from './interface';
|
|
3
|
+
import { EAuthMeCardClass, EAuthMeIDCardAntiFraudStage } from './enum';
|
|
4
|
+
export declare class CardOCR extends AuthmeEngineModuleBase<CardOCRResult> {
|
|
5
|
+
private type;
|
|
6
|
+
constructor(engine: MlEngine);
|
|
7
|
+
setType(type: EAuthMeCardClass): Promise<unknown>;
|
|
8
|
+
getType(): EAuthMeCardClass;
|
|
9
|
+
setParams(params: any): Promise<unknown>;
|
|
10
|
+
}
|
|
11
|
+
export interface Point {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class IdCardAntiFraudService extends AuthmeEngineModuleBase<IDCardAntiFraudResult> {
|
|
16
|
+
constructor(engine: MlEngine);
|
|
17
|
+
setStage(stageList: EAuthMeIDCardAntiFraudStage[]): Promise<unknown>;
|
|
18
|
+
getCardMatchROI(config?: {
|
|
19
|
+
stage: string;
|
|
20
|
+
}): Promise<Point[]>;
|
|
21
|
+
}
|
|
22
|
+
export declare class MRZService<T extends PassportResult | ResidentCardResult> extends AuthmeEngineModuleBase<T> {
|
|
23
|
+
private type;
|
|
24
|
+
constructor(engine: MlEngine, type?: 'passport' | 'residentCard');
|
|
25
|
+
getFinalResult(): Promise<unknown>;
|
|
26
|
+
toJson(params: unknown): Promise<string>;
|
|
27
|
+
}
|
package/src/lib/util.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { CountryCode, EAuthMeCardClass, IdRecognitionCardType, ServerSideEAuthMeCardClass } from './enum';
|
|
2
|
-
export declare function getCardSubTypes(type: IdRecognitionCardType, country: CountryCode): EAuthMeCardClass[];
|
|
3
|
-
export declare function getCardTypes(type: IdRecognitionCardType, country: CountryCode): string[];
|
|
4
|
-
export declare function cardTypeTitle(cardType: string): any;
|
|
5
|
-
export declare function cardTypeHeader(cardType: string): any;
|
|
6
|
-
export declare function cardTypeConfirmTitle(cardType: string): any;
|
|
7
|
-
export declare function mapCardtypeToAuthmeClass(type: string): any;
|
|
8
|
-
export declare function getRecognitionColumnOrder(column: string): number;
|
|
9
|
-
export declare const twoWayAuthmeCardClassMap: {
|
|
10
|
-
toServer(clientEnum: `${EAuthMeCardClass}`): `${ServerSideEAuthMeCardClass}`;
|
|
11
|
-
toClient(serverEnum: `${ServerSideEAuthMeCardClass}`): `${EAuthMeCardClass}`;
|
|
12
|
-
};
|
|
1
|
+
import { CountryCode, EAuthMeCardClass, IdRecognitionCardType, ServerSideEAuthMeCardClass } from './enum';
|
|
2
|
+
export declare function getCardSubTypes(type: IdRecognitionCardType, country: CountryCode): EAuthMeCardClass[];
|
|
3
|
+
export declare function getCardTypes(type: IdRecognitionCardType, country: CountryCode): string[];
|
|
4
|
+
export declare function cardTypeTitle(cardType: string): any;
|
|
5
|
+
export declare function cardTypeHeader(cardType: string): any;
|
|
6
|
+
export declare function cardTypeConfirmTitle(cardType: string): any;
|
|
7
|
+
export declare function mapCardtypeToAuthmeClass(type: string): any;
|
|
8
|
+
export declare function getRecognitionColumnOrder(column: string): number;
|
|
9
|
+
export declare const twoWayAuthmeCardClassMap: {
|
|
10
|
+
toServer(clientEnum: `${EAuthMeCardClass}`): `${ServerSideEAuthMeCardClass}`;
|
|
11
|
+
toClient(serverEnum: `${ServerSideEAuthMeCardClass}`): `${EAuthMeCardClass}`;
|
|
12
|
+
};
|
package/src/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version: string;
|
|
1
|
+
export declare const version: string;
|