@authme/id-recognition 2.8.4 → 2.8.5
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 +4 -31
- package/index.js +4 -31
- package/package.json +4 -4
- package/src/lib/data-access/api.d.ts +2 -1
package/index.cjs
CHANGED
|
@@ -399,8 +399,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
var name = "authme/sdk";
|
|
402
|
-
var version$1 = "2.8.
|
|
403
|
-
var date = "2025-03-
|
|
402
|
+
var version$1 = "2.8.5";
|
|
403
|
+
var date = "2025-03-17T05:56:00+0000";
|
|
404
404
|
var packageInfo = {
|
|
405
405
|
name: name,
|
|
406
406
|
version: version$1,
|
|
@@ -611,36 +611,9 @@ function logCollect(message, stackTrace) {
|
|
|
611
611
|
body: JSON.stringify(body)
|
|
612
612
|
});
|
|
613
613
|
}
|
|
614
|
-
function option() {
|
|
614
|
+
function option(deviceType) {
|
|
615
615
|
return __awaiter(this, void 0, void 0, function* () {
|
|
616
|
-
|
|
617
|
-
// const accessToken = Storage.getItem('token') as string | null;
|
|
618
|
-
// const baseUrl = Storage.getItem('apiBaseUrl') as string | null;
|
|
619
|
-
// const normalizedUrl = baseUrl ? new URL(url, baseUrl).toString() : url;
|
|
620
|
-
// try {
|
|
621
|
-
// const response = await fetch(normalizedUrl, {
|
|
622
|
-
// method: 'GET',
|
|
623
|
-
// headers: {
|
|
624
|
-
// 'Content-Type': 'application/json',
|
|
625
|
-
// 'Authorization': `Bearer ${accessToken}`, // 如果需要身份驗證
|
|
626
|
-
// 'sdk-info': [
|
|
627
|
-
// `sdk-version: ${version}`,
|
|
628
|
-
// `platform: ${navigator.platform}`,
|
|
629
|
-
// ].join(';') as string
|
|
630
|
-
// }
|
|
631
|
-
// });
|
|
632
|
-
// if (!response.ok) {
|
|
633
|
-
// // throw new Error(`HTTP error! Status: ${response.status}`);
|
|
634
|
-
// return {};
|
|
635
|
-
// }
|
|
636
|
-
// const data = await response.json();
|
|
637
|
-
// console.log('Response Data:', data);
|
|
638
|
-
// return data; // 可以回傳資料讓其他函式使用
|
|
639
|
-
// } catch (error) {
|
|
640
|
-
// console.error('Fetch Error:', error);
|
|
641
|
-
// return {}; // 或拋出錯誤,視需求而定
|
|
642
|
-
// }
|
|
643
|
-
return core.sendRequest('/api/identity-verification/v1/option', 'GET');
|
|
616
|
+
return core.sendRequest(`/api/identity-verification/v1/option${deviceType ? '?deviceType=' + deviceType : ''}`, 'GET');
|
|
644
617
|
});
|
|
645
618
|
}
|
|
646
619
|
function themeUI(themeId) {
|
package/index.js
CHANGED
|
@@ -396,8 +396,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
var name = "authme/sdk";
|
|
399
|
-
var version$1 = "2.8.
|
|
400
|
-
var date = "2025-03-
|
|
399
|
+
var version$1 = "2.8.5";
|
|
400
|
+
var date = "2025-03-17T05:56:00+0000";
|
|
401
401
|
var packageInfo = {
|
|
402
402
|
name: name,
|
|
403
403
|
version: version$1,
|
|
@@ -608,36 +608,9 @@ function logCollect(message, stackTrace) {
|
|
|
608
608
|
body: JSON.stringify(body)
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
|
-
function option() {
|
|
611
|
+
function option(deviceType) {
|
|
612
612
|
return __awaiter(this, void 0, void 0, function* () {
|
|
613
|
-
|
|
614
|
-
// const accessToken = Storage.getItem('token') as string | null;
|
|
615
|
-
// const baseUrl = Storage.getItem('apiBaseUrl') as string | null;
|
|
616
|
-
// const normalizedUrl = baseUrl ? new URL(url, baseUrl).toString() : url;
|
|
617
|
-
// try {
|
|
618
|
-
// const response = await fetch(normalizedUrl, {
|
|
619
|
-
// method: 'GET',
|
|
620
|
-
// headers: {
|
|
621
|
-
// 'Content-Type': 'application/json',
|
|
622
|
-
// 'Authorization': `Bearer ${accessToken}`, // 如果需要身份驗證
|
|
623
|
-
// 'sdk-info': [
|
|
624
|
-
// `sdk-version: ${version}`,
|
|
625
|
-
// `platform: ${navigator.platform}`,
|
|
626
|
-
// ].join(';') as string
|
|
627
|
-
// }
|
|
628
|
-
// });
|
|
629
|
-
// if (!response.ok) {
|
|
630
|
-
// // throw new Error(`HTTP error! Status: ${response.status}`);
|
|
631
|
-
// return {};
|
|
632
|
-
// }
|
|
633
|
-
// const data = await response.json();
|
|
634
|
-
// console.log('Response Data:', data);
|
|
635
|
-
// return data; // 可以回傳資料讓其他函式使用
|
|
636
|
-
// } catch (error) {
|
|
637
|
-
// console.error('Fetch Error:', error);
|
|
638
|
-
// return {}; // 或拋出錯誤,視需求而定
|
|
639
|
-
// }
|
|
640
|
-
return sendRequest('/api/identity-verification/v1/option', 'GET');
|
|
613
|
+
return sendRequest(`/api/identity-verification/v1/option${deviceType ? '?deviceType=' + deviceType : ''}`, 'GET');
|
|
641
614
|
});
|
|
642
615
|
}
|
|
643
616
|
function themeUI(themeId) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authme/id-recognition",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.5",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"core-js": "^3.6.0",
|
|
6
|
-
"@authme/core": "2.8.
|
|
7
|
-
"@authme/util": "2.8.
|
|
8
|
-
"@authme/engine": "2.8.
|
|
6
|
+
"@authme/core": "2.8.5",
|
|
7
|
+
"@authme/util": "2.8.5",
|
|
8
|
+
"@authme/engine": "2.8.5"
|
|
9
9
|
},
|
|
10
10
|
"module": "./index.js",
|
|
11
11
|
"main": "./index.cjs",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CountryCode, IdRecognitionCardType, RecognitionFileType, ResourceImageType } from '../enum';
|
|
2
2
|
import { InitScanResponse } from '../model';
|
|
3
3
|
import { ScanViewItem, WelcomePageConfig, ThicknessMode } from '../interface';
|
|
4
|
+
import { DEVICE_TYPE } from '@authme/util';
|
|
4
5
|
interface InitScanDocumentParams {
|
|
5
6
|
scanDocumentId: string;
|
|
6
7
|
scanView: ScanViewItem;
|
|
@@ -87,6 +88,6 @@ export declare function saveExtraDoc(params: {
|
|
|
87
88
|
};
|
|
88
89
|
}): Promise<any>;
|
|
89
90
|
export declare function logCollect(message: string, stackTrace: string): Promise<any>;
|
|
90
|
-
export declare function option(): Promise<any>;
|
|
91
|
+
export declare function option(deviceType?: DEVICE_TYPE | null): Promise<any>;
|
|
91
92
|
export declare function themeUI(themeId: string): Promise<any>;
|
|
92
93
|
export {};
|