@authme/core 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/package.json CHANGED
@@ -1,15 +1,10 @@
1
1
  {
2
2
  "name": "@authme/core",
3
- "version": "2.8.41",
3
+ "version": "2.8.44",
4
4
  "peerDependencies": {
5
- "core-js": "^3.6.0",
6
- "@authme/util": "2.8.41",
7
- "rxjs": "7.8.2",
8
- "uuid": "8.3.2"
5
+ "core-js": "^3.6.0"
9
6
  },
10
- "module": "./index.js",
11
- "main": "./index.cjs",
12
- "type": "module",
13
- "types": "./src/index.d.ts",
14
- "dependencies": {}
15
- }
7
+ "module": "./index.esm.js",
8
+ "main": "./index.cjs.js",
9
+ "types": "./index.esm.d.ts"
10
+ }
package/src/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from './lib/core';
2
- export * from './lib/model';
3
- export * from './lib/data-access';
4
- export * from './lib/translate';
5
- export * from './lib/enum/language.enum';
6
- export * from './lib/features';
7
- export * from './lib/api';
8
- export { version } from './lib/version';
1
+ export * from './lib/core';
2
+ export * from './lib/model';
3
+ export * from './lib/data-access';
4
+ export * from './lib/translate';
5
+ export * from './lib/enum/language.enum';
6
+ export * from './lib/features';
7
+ export * from './lib/api';
8
+ export { version } from './lib/version';
@@ -1 +1,9 @@
1
- export declare function getCustomerState(): Promise<any>;
1
+ interface stateResponse {
2
+ state: string;
3
+ createTime: string;
4
+ code?: string;
5
+ customDetails?: string;
6
+ message?: string;
7
+ }
8
+ export declare function getCustomerState(): Promise<stateResponse>;
9
+ export {};
@@ -1 +1 @@
1
- export * from './api';
1
+ export * from './api';
package/src/lib/core.d.ts CHANGED
@@ -1 +1 @@
1
- export declare function core(): string;
1
+ export declare function core(): string;
@@ -1,20 +1,20 @@
1
- import { DebugLog } from '@authme/util';
2
- declare type LoggingFunc = (fun: () => Promise<any>, logParams?: Partial<DebugLog<any>>) => Promise<any>;
3
- declare const setRequestLoggingFunc: (func: LoggingFunc) => void;
4
- export { setRequestLoggingFunc };
5
- export interface RequestOptions {
6
- header: {
7
- [header: string]: string;
8
- };
9
- params: {
10
- [param: string]: string;
11
- };
12
- }
13
- export declare function sendRequest<TResp = any>(url: string, method?: string, { body, contentType, expectedResponseContentTypes, accessToken, baseUrl, sdkInfo, }?: {
14
- body?: unknown;
15
- contentType?: string;
16
- expectedResponseContentTypes?: string[];
17
- accessToken?: string;
18
- baseUrl?: string;
19
- sdkInfo?: string;
20
- }): Promise<TResp>;
1
+ import { DebugLog } from '@authme/util';
2
+ type LoggingFunc = (fun: () => Promise<any>, logParams?: Partial<DebugLog<any>>) => Promise<any>;
3
+ declare const setRequestLoggingFunc: (func: LoggingFunc) => void;
4
+ export { setRequestLoggingFunc };
5
+ export interface RequestOptions {
6
+ header: {
7
+ [header: string]: string;
8
+ };
9
+ params: {
10
+ [param: string]: string;
11
+ };
12
+ }
13
+ export declare function sendRequest<TResp = any>(url: string, method?: string, { body, contentType, expectedResponseContentTypes, accessToken, baseUrl, sdkInfo, }?: {
14
+ body?: unknown;
15
+ contentType?: string;
16
+ expectedResponseContentTypes?: string[];
17
+ accessToken?: string;
18
+ baseUrl?: string;
19
+ sdkInfo?: string;
20
+ }): Promise<TResp>;
@@ -1 +1 @@
1
- export * from './http-client';
1
+ export * from './http-client';
@@ -1,5 +1,5 @@
1
- export declare enum AuthmeLanguage {
2
- 'zh-TW' = "zh_Hant_TW",
3
- 'en-US' = "en_US",
4
- 'ja-JP' = "ja_JP"
5
- }
1
+ export declare enum AuthmeLanguage {
2
+ 'zh-TW' = "zh_Hant_TW",
3
+ 'en-US' = "en_US",
4
+ 'ja-JP' = "ja_JP"
5
+ }
@@ -1,18 +1,18 @@
1
- import { BehaviorSubject } from 'rxjs';
2
- import { EventTrackingStatus } from './status.interface';
3
- declare class EventListenerService {
4
- private readonly getStatusProcess;
5
- private pingInterval;
6
- private statusSubject;
7
- private pingSubscription;
8
- private apiService;
9
- constructor(getStatusProcess: () => Promise<EventTrackingStatus>, options?: {
10
- pingInterval?: number;
11
- });
12
- start(): void;
13
- stop(): void;
14
- sendUserActionStatus(status: EventTrackingStatus): Promise<any>;
15
- private sendStatus;
16
- getStatusObservable(): BehaviorSubject<EventTrackingStatus>;
17
- }
18
- export { EventListenerService };
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import { EventTrackingStatus } from './status.interface';
3
+ declare class EventListenerService {
4
+ private readonly getStatusProcess;
5
+ private pingInterval;
6
+ private statusSubject;
7
+ private pingSubscription;
8
+ private apiService;
9
+ constructor(getStatusProcess: () => Promise<EventTrackingStatus>, options?: {
10
+ pingInterval?: number;
11
+ });
12
+ start(): void;
13
+ stop(): void;
14
+ sendUserActionStatus(status: EventTrackingStatus): Promise<any>;
15
+ private sendStatus;
16
+ getStatusObservable(): BehaviorSubject<EventTrackingStatus>;
17
+ }
18
+ export { EventListenerService };
@@ -1,4 +1,4 @@
1
- import { EventTrackingStatus } from './status.interface';
2
- export declare function sendEventLogging(events: EventTrackingStatus[], pingMethod: () => Promise<EventTrackingStatus>): Promise<{
3
- scanDocumentId: string;
4
- } | undefined>;
1
+ import { EventTrackingStatus } from './status.interface';
2
+ export declare function sendEventLogging(events: EventTrackingStatus[], pingMethod: () => Promise<EventTrackingStatus>): Promise<{
3
+ scanDocumentId: string;
4
+ } | undefined>;
@@ -1,5 +1,5 @@
1
- export * from './event-listener.service';
2
- export * from './status.interface';
3
- export * from './status.service';
4
- export * from './status.enum';
5
- export * from './tracking-event';
1
+ export * from './event-listener.service';
2
+ export * from './status.interface';
3
+ export * from './status.service';
4
+ export * from './status.enum';
5
+ export * from './tracking-event';
@@ -1,7 +1,7 @@
1
- import { EventTrackingStatus } from './status.interface';
2
- export declare class MockApiService {
3
- private data;
4
- postStatus(status: EventTrackingStatus): Promise<EventTrackingStatus>;
5
- postMutiStatus(status: EventTrackingStatus[]): Promise<EventTrackingStatus[]>;
6
- getStatus(): Promise<EventTrackingStatus[]>;
7
- }
1
+ import { EventTrackingStatus } from './status.interface';
2
+ export declare class MockApiService {
3
+ private data;
4
+ postStatus(status: EventTrackingStatus): Promise<EventTrackingStatus>;
5
+ postMutiStatus(status: EventTrackingStatus[]): Promise<EventTrackingStatus[]>;
6
+ getStatus(): Promise<EventTrackingStatus[]>;
7
+ }
@@ -1,84 +1,84 @@
1
- export declare enum Feature {
2
- OCRFraud = "OCRFraud",
3
- OCR = "OCR",
4
- SelectCardTypeAndCountry = "SelectCardTypeAndCountry",
5
- LivenessActive = "LivenessActive",
6
- LivenessPassive = "LivenessPassive"
7
- }
8
- export declare enum StatusEvent {
9
- TWID = "TWID",
10
- TWIDFraud = "TWIDFraud",
11
- TWIDFront = "TWIDFront",
12
- TWDriverLicenseFront = "TWDriverLicenseFront",
13
- Passport = "Passport",
14
- ResidencePermitFront = "ResidencePermitFront",
15
- ResidencePermitBack = "ResidencePermitBack",
16
- TWIDBack = "TWIDBack",
17
- TWDriverLicenseBack = "TWDriverLicenseBack",
18
- TWHealthCardFront = "TWHealthCardFront",
19
- TWDriverLicense = "TWDriverLicense",
20
- TWHealthCard = "TWHealthCard",
21
- ResidencePermit = "ResidencePermit",
22
- PassportFront = "PassportFront",
23
- OpenMouth = "OpenMouth",
24
- CloseMouth = "CloseMouth",
25
- Smile = "Smile",
26
- Scale = "Scale",
27
- Done = "Done",
28
- Passive = "Passive",
29
- SelectCardTypeAndCountry = "SelectCardTypeAndCountry",
30
- CardThicknessFailed = "CardThicknessFailed"
31
- }
32
- export declare enum StatusView {
33
- Info = "Info",
34
- Init = "Init",
35
- Aligning = "Aligning",
36
- Start = "Start",
37
- Up = "Up",
38
- Down = "Down",
39
- Left = "Left",
40
- Right = "Right",
41
- Running = "Running",
42
- Confirm = "Confirm",
43
- Uploading = "Uploading",
44
- Select = "Select"
45
- }
46
- export declare enum StatusAction {
47
- Uploading = "Uploading",
48
- Show = "Show",
49
- BtnClose = "BtnClose",
50
- BtnStart = "BtnStart",
51
- InitError = "InitError",
52
- Start = "Start",
53
- Confirm = "Confirm",
54
- Retry = "Retry"
55
- }
56
- export declare enum StatusDescription {
57
- NoCard = "NoCard",
58
- WrongCardType = "WrongCardType",
59
- PositionNotMatch = "PositionNotMatch",
60
- Reflective = "Reflective",
61
- Blur = "Blur",
62
- Motion = "Motion",
63
- Pass = "Pass",
64
- Error = "Error",
65
- Failed = "Failed",
66
- Timeout = "Timeout",
67
- Gray = "Gray",
68
- NeedMoreFrame = "NeedMoreFrame",
69
- NotAligned = "NotAligned",
70
- NoFace = "NoFace",
71
- FaceNotAtCenter = "FaceNotAtCenter",
72
- FaceTooSmall = "FaceTooSmall",
73
- FaceTooLarge = "FaceTooLarge",
74
- NeedFaceToCamera = "NeedFaceToCamera",
75
- FaceMasked = "FaceMasked",
76
- NeedOpenMouth = "NeedOpenMouth",
77
- NeedCloseMouth = "NeedCloseMouth",
78
- NeedSmile = "NeedSmile",
79
- NeedOpenEyes = "NeedOpenEyes",
80
- UploadingStart = "UploadingStart",
81
- UploadingEnd = "UploadingEnd",
82
- Complete = "Complete",
83
- CardThicknessFailed = "CardThicknessFailed"
84
- }
1
+ export declare enum Feature {
2
+ OCRFraud = "OCRFraud",
3
+ OCR = "OCR",
4
+ SelectCardTypeAndCountry = "SelectCardTypeAndCountry",
5
+ LivenessActive = "LivenessActive",
6
+ LivenessPassive = "LivenessPassive"
7
+ }
8
+ export declare enum StatusEvent {
9
+ TWID = "TWID",
10
+ TWIDFraud = "TWIDFraud",
11
+ TWIDFront = "TWIDFront",
12
+ TWDriverLicenseFront = "TWDriverLicenseFront",
13
+ Passport = "Passport",
14
+ ResidencePermitFront = "ResidencePermitFront",
15
+ ResidencePermitBack = "ResidencePermitBack",
16
+ TWIDBack = "TWIDBack",
17
+ TWDriverLicenseBack = "TWDriverLicenseBack",
18
+ TWHealthCardFront = "TWHealthCardFront",
19
+ TWDriverLicense = "TWDriverLicense",
20
+ TWHealthCard = "TWHealthCard",
21
+ ResidencePermit = "ResidencePermit",
22
+ PassportFront = "PassportFront",
23
+ OpenMouth = "OpenMouth",
24
+ CloseMouth = "CloseMouth",
25
+ Smile = "Smile",
26
+ Scale = "Scale",
27
+ Done = "Done",
28
+ Passive = "Passive",
29
+ SelectCardTypeAndCountry = "SelectCardTypeAndCountry",
30
+ CardThicknessFailed = "CardThicknessFailed"
31
+ }
32
+ export declare enum StatusView {
33
+ Info = "Info",
34
+ Init = "Init",
35
+ Aligning = "Aligning",
36
+ Start = "Start",
37
+ Up = "Up",
38
+ Down = "Down",
39
+ Left = "Left",
40
+ Right = "Right",
41
+ Running = "Running",
42
+ Confirm = "Confirm",
43
+ Uploading = "Uploading",
44
+ Select = "Select"
45
+ }
46
+ export declare enum StatusAction {
47
+ Uploading = "Uploading",
48
+ Show = "Show",
49
+ BtnClose = "BtnClose",
50
+ BtnStart = "BtnStart",
51
+ InitError = "InitError",
52
+ Start = "Start",
53
+ Confirm = "Confirm",
54
+ Retry = "Retry"
55
+ }
56
+ export declare enum StatusDescription {
57
+ NoCard = "NoCard",
58
+ WrongCardType = "WrongCardType",
59
+ PositionNotMatch = "PositionNotMatch",
60
+ Reflective = "Reflective",
61
+ Blur = "Blur",
62
+ Motion = "Motion",
63
+ Pass = "Pass",
64
+ Error = "Error",
65
+ Failed = "Failed",
66
+ Timeout = "Timeout",
67
+ Gray = "Gray",
68
+ NeedMoreFrame = "NeedMoreFrame",
69
+ NotAligned = "NotAligned",
70
+ NoFace = "NoFace",
71
+ FaceNotAtCenter = "FaceNotAtCenter",
72
+ FaceTooSmall = "FaceTooSmall",
73
+ FaceTooLarge = "FaceTooLarge",
74
+ NeedFaceToCamera = "NeedFaceToCamera",
75
+ FaceMasked = "FaceMasked",
76
+ NeedOpenMouth = "NeedOpenMouth",
77
+ NeedCloseMouth = "NeedCloseMouth",
78
+ NeedSmile = "NeedSmile",
79
+ NeedOpenEyes = "NeedOpenEyes",
80
+ UploadingStart = "UploadingStart",
81
+ UploadingEnd = "UploadingEnd",
82
+ Complete = "Complete",
83
+ CardThicknessFailed = "CardThicknessFailed"
84
+ }
@@ -1,40 +1,40 @@
1
- import { Feature, StatusAction, StatusDescription, StatusEvent, StatusView } from './status.enum';
2
- import { TrackingEvent } from './tracking-event';
3
- export interface EventTrackingStatus {
4
- eventId: string;
5
- sessionId: string;
6
- eventType: string;
7
- userTime: string;
8
- tenantId: string;
9
- customerId: string;
10
- duration: number;
11
- deviceInfo: string;
12
- systemInfo: string;
13
- version: string;
14
- language: string;
15
- description: string;
16
- platform: string;
17
- extraInfo: string;
18
- }
19
- export interface GenerateStatusParams {
20
- eventType?: TrackingEvent;
21
- sessionId?: string;
22
- userTime?: string;
23
- tenantId?: string;
24
- customerId?: string;
25
- duration?: number;
26
- deviceInfo?: string;
27
- systemInfo?: string;
28
- version?: string;
29
- language?: string;
30
- description?: string;
31
- platform?: string;
32
- extraInfo?: string;
33
- }
34
- export interface NewEventNameDTO {
35
- feature?: Feature;
36
- event?: StatusEvent;
37
- view?: StatusView;
38
- action?: StatusAction;
39
- description?: StatusDescription;
40
- }
1
+ import { Feature, StatusAction, StatusDescription, StatusEvent, StatusView } from './status.enum';
2
+ import { TrackingEvent } from './tracking-event';
3
+ export interface EventTrackingStatus {
4
+ eventId: string;
5
+ sessionId: string;
6
+ eventType: string;
7
+ userTime: string;
8
+ tenantId: string;
9
+ customerId: string;
10
+ duration: number;
11
+ deviceInfo: string;
12
+ systemInfo: string;
13
+ version: string;
14
+ language: string;
15
+ description: string;
16
+ platform: string;
17
+ extraInfo: string;
18
+ }
19
+ export interface GenerateStatusParams {
20
+ eventType?: TrackingEvent;
21
+ sessionId?: string;
22
+ userTime?: string;
23
+ tenantId?: string;
24
+ customerId?: string;
25
+ duration?: number;
26
+ deviceInfo?: string;
27
+ systemInfo?: string;
28
+ version?: string;
29
+ language?: string;
30
+ description?: string;
31
+ platform?: string;
32
+ extraInfo?: string;
33
+ }
34
+ export interface NewEventNameDTO {
35
+ feature?: Feature;
36
+ event?: StatusEvent;
37
+ view?: StatusView;
38
+ action?: StatusAction;
39
+ description?: StatusDescription;
40
+ }
@@ -1,4 +1,4 @@
1
- import { EventTrackingStatus, GenerateStatusParams } from './status.interface';
2
- export declare const getAccessToken: () => string, setAccessToken: (value: string) => void;
3
- export declare const getSessionId: () => string, setSessionId: (value: string) => void;
4
- export declare function generateStatus(params?: GenerateStatusParams): EventTrackingStatus;
1
+ import { EventTrackingStatus, GenerateStatusParams } from './status.interface';
2
+ export declare const getAccessToken: () => string, setAccessToken: (value: string) => void;
3
+ export declare const getSessionId: () => string, setSessionId: (value: string) => void;
4
+ export declare function generateStatus(params?: GenerateStatusParams): EventTrackingStatus;
@@ -1,22 +1,22 @@
1
- import { Feature, StatusAction, StatusDescription, StatusEvent, StatusView } from './status.enum';
2
- import { NewEventNameDTO } from './status.interface';
3
- export declare class TrackingEvent {
4
- private _feature?;
5
- private _event?;
6
- private _view?;
7
- private _action?;
8
- private _description?;
9
- constructor(params: NewEventNameDTO);
10
- nonNull(data: any): boolean;
11
- get feature(): Feature | undefined;
12
- set feature(value: Feature | undefined);
13
- get event(): StatusEvent | undefined;
14
- set event(value: StatusEvent | undefined);
15
- get view(): StatusView | undefined;
16
- set view(value: StatusView | undefined);
17
- get action(): StatusAction | undefined;
18
- set action(value: StatusAction | undefined);
19
- get description(): StatusDescription | undefined;
20
- set description(value: StatusDescription | undefined);
21
- toString(): string;
22
- }
1
+ import { Feature, StatusAction, StatusDescription, StatusEvent, StatusView } from './status.enum';
2
+ import { NewEventNameDTO } from './status.interface';
3
+ export declare class TrackingEvent {
4
+ private _feature?;
5
+ private _event?;
6
+ private _view?;
7
+ private _action?;
8
+ private _description?;
9
+ constructor(params: NewEventNameDTO);
10
+ nonNull(data: any): boolean;
11
+ get feature(): Feature | undefined;
12
+ set feature(value: Feature | undefined);
13
+ get event(): StatusEvent | undefined;
14
+ set event(value: StatusEvent | undefined);
15
+ get view(): StatusView | undefined;
16
+ set view(value: StatusView | undefined);
17
+ get action(): StatusAction | undefined;
18
+ set action(value: StatusAction | undefined);
19
+ get description(): StatusDescription | undefined;
20
+ set description(value: StatusDescription | undefined);
21
+ toString(): string;
22
+ }
@@ -1 +1 @@
1
- export * from './event-listener';
1
+ export * from './event-listener';
@@ -1 +1 @@
1
- export { AuthmeError, ErrorCode } from '@authme/util';
1
+ export { AuthmeError, ErrorCode } from '@authme/util';
@@ -1 +1 @@
1
- export * from './authme-error';
1
+ export * from './authme-error';
@@ -1 +1 @@
1
- export * from './translate';
1
+ export * from './translate';
@@ -1,17 +1,17 @@
1
- import { AuthmeLanguage } from '../enum/language.enum';
2
- declare class TranslateService {
3
- private originalDict;
4
- private customDict;
5
- private languageOptions;
6
- private currentLang;
7
- fetchSource(path: string): Promise<boolean>;
8
- extendSource(path: string, lang: AuthmeLanguage): Promise<boolean>;
9
- setLang(lang: AuthmeLanguage): Promise<void>;
10
- translate(key: string, args?: {
11
- [key: string]: string | number;
12
- }): string;
13
- getCurrentLang(): AuthmeLanguage;
14
- static instance: TranslateService | null;
15
- }
16
- declare function getTranslateInstance(): TranslateService;
17
- export { getTranslateInstance };
1
+ import { AuthmeLanguage } from '../enum/language.enum';
2
+ declare class TranslateService {
3
+ private originalDict;
4
+ private customDict;
5
+ private languageOptions;
6
+ private currentLang;
7
+ fetchSource(path: string): Promise<boolean>;
8
+ extendSource(path: string, lang: AuthmeLanguage): Promise<boolean>;
9
+ setLang(lang: AuthmeLanguage): Promise<void>;
10
+ translate(key: string, args?: {
11
+ [key: string]: string | number;
12
+ }): string;
13
+ getCurrentLang(): AuthmeLanguage;
14
+ static instance: TranslateService | null;
15
+ }
16
+ declare function getTranslateInstance(): TranslateService;
17
+ export { getTranslateInstance };
@@ -1 +1 @@
1
- export declare const version: string;
1
+ export declare const version: string;