@tsocial/tvweb-sdk.platform 5.38.6 → 5.39.0
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/build/esm/chunk-1d384f20.js +1 -0
- package/build/esm/chunk-27b5190a.js +1 -0
- package/build/esm/{chunk-1728a090.js → chunk-350b505f.js} +6 -6
- package/build/esm/chunk-45027d22.js +1 -0
- package/build/esm/chunk-56ff2805.js +1 -0
- package/build/esm/chunk-58edda3a.js +1 -0
- package/build/esm/chunk-75ce79a0.js +1 -0
- package/build/esm/{chunk-0ea4172a.js → chunk-775d9333.js} +1 -1
- package/build/esm/{chunk-6286485c.js → chunk-85259a74.js} +1 -1
- package/build/esm/{chunk-154949ca.js → chunk-8bf79f3b.js} +2 -2
- package/build/esm/chunk-902ec710.js +1 -0
- package/build/esm/{chunk-9eada203.js → chunk-96477bba.js} +2 -2
- package/build/esm/{chunk-48f9a5aa.js → chunk-ad72e8c0.js} +1 -1
- package/build/esm/chunk-b1789154.js +1289 -0
- package/build/esm/chunk-bc2b1de2.js +1 -0
- package/build/esm/{chunk-64828bb8.js → chunk-beafff75.js} +2 -2
- package/build/esm/chunk-d6bd2530.js +1 -0
- package/build/esm/chunk-d8272db4.js +1 -0
- package/build/esm/{chunk-ce566d86.js → chunk-e1d2b0c2.js} +145 -73
- package/build/esm/{chunk-ce163453.js → chunk-f5f9af46.js} +1 -1
- package/build/esm/tvweb-sdk.platform.esm.min.js +1 -1
- package/build/tvweb-sdk.platform.cjs.min.js +859 -715
- package/build/tvweb-sdk.platform.standalone.js +6270 -5327
- package/build/tvweb-sdk.platform.standalone.min.js +859 -715
- package/build/types/index.d.ts +77 -12
- package/package.json +7 -7
- package/build/esm/chunk-3f07fcfc.js +0 -1217
- package/build/esm/chunk-4b1c26ed.js +0 -1
- package/build/esm/chunk-4d240b24.js +0 -1
- package/build/esm/chunk-4eeba5bf.js +0 -1
- package/build/esm/chunk-63dc8e83.js +0 -1
- package/build/esm/chunk-6fa435b8.js +0 -1
- package/build/esm/chunk-79020374.js +0 -1
- package/build/esm/chunk-95fa5e4c.js +0 -1
- package/build/esm/chunk-d6a21024.js +0 -1
- package/build/esm/chunk-e199b455.js +0 -1
- package/build/esm/chunk-e62b8b2e.js +0 -1
package/build/types/index.d.ts
CHANGED
|
@@ -1158,6 +1158,7 @@ declare const _default: {
|
|
|
1158
1158
|
upload_invalid_file_type: string;
|
|
1159
1159
|
upload_processing_failed: string;
|
|
1160
1160
|
image_preview_unavailable: string;
|
|
1161
|
+
upload_type_menu_label: string;
|
|
1161
1162
|
front_card_title: string;
|
|
1162
1163
|
back_card_title: string;
|
|
1163
1164
|
front_card_description: string;
|
|
@@ -1213,24 +1214,24 @@ type Translation = typeof _default;
|
|
|
1213
1214
|
type CustomTexts = Partial<Translation> & {
|
|
1214
1215
|
[key: string]: string;
|
|
1215
1216
|
};
|
|
1216
|
-
interface BlazefaceModel {
|
|
1217
|
+
interface BlazefaceModel$1 {
|
|
1217
1218
|
load(params?: {
|
|
1218
1219
|
modelUrl?: string;
|
|
1219
1220
|
}): Promise<any>;
|
|
1220
1221
|
}
|
|
1221
|
-
interface TFLite {
|
|
1222
|
+
interface TFLite$1 {
|
|
1222
1223
|
loadTFLiteModel(data: Uint8Array, options?: Record<string, any>): Promise<any>;
|
|
1223
1224
|
}
|
|
1224
|
-
interface TensorFlow {
|
|
1225
|
+
interface TensorFlow$1 {
|
|
1225
1226
|
enableProdMode(): Promise<void>;
|
|
1226
1227
|
setBackend(backend: string): Promise<void>;
|
|
1227
1228
|
ready(): Promise<void>;
|
|
1228
1229
|
}
|
|
1229
1230
|
declare global {
|
|
1230
1231
|
interface Window {
|
|
1231
|
-
tf: TensorFlow;
|
|
1232
|
-
blazeface: BlazefaceModel;
|
|
1233
|
-
tflite: TFLite;
|
|
1232
|
+
tf: TensorFlow$1;
|
|
1233
|
+
blazeface: BlazefaceModel$1;
|
|
1234
|
+
tflite: TFLite$1;
|
|
1234
1235
|
tv_model_backend_init?: string[];
|
|
1235
1236
|
}
|
|
1236
1237
|
}
|
|
@@ -1330,6 +1331,13 @@ type ReadIDCardResult = {
|
|
|
1330
1331
|
cardSide: 'front' | 'back';
|
|
1331
1332
|
cardType: string;
|
|
1332
1333
|
source?: 'capture' | 'upload';
|
|
1334
|
+
/** Id of the upload type the image was uploaded with (uploads only). A back-side upload inherits the front's type. */
|
|
1335
|
+
uploadTypeId?: string;
|
|
1336
|
+
/**
|
|
1337
|
+
* True when no further step will run (last configured step, or an upload type with `hasBackSide: false`).
|
|
1338
|
+
* Close the SDK when true.
|
|
1339
|
+
*/
|
|
1340
|
+
isLastStep: boolean;
|
|
1333
1341
|
image: {
|
|
1334
1342
|
blob: Blob;
|
|
1335
1343
|
encrypted?: {
|
|
@@ -1384,8 +1392,11 @@ type APICredentials = {
|
|
|
1384
1392
|
secretKey: string;
|
|
1385
1393
|
apiUrl: string;
|
|
1386
1394
|
fallbackUrls?: string[];
|
|
1395
|
+
xRequestId?: string;
|
|
1396
|
+
xRequestId2?: string;
|
|
1387
1397
|
};
|
|
1388
1398
|
type LogCredentials = APICredentials & {
|
|
1399
|
+
/** @deprecated prefer `xRequestId`; kept as a fallback for existing integrations */
|
|
1389
1400
|
userId?: string;
|
|
1390
1401
|
enable?: boolean;
|
|
1391
1402
|
logSignature?: {
|
|
@@ -1411,9 +1422,30 @@ type IDCardStep = {
|
|
|
1411
1422
|
enableConfirmPopup?: boolean;
|
|
1412
1423
|
};
|
|
1413
1424
|
type CardTypeString = 'vn.national_id' | 'vn.cmnd_old' | 'vn.cmnd_new' | 'vn.cccd' | 'vn.cccd_new' | 'vn.tcc' | 'vn.passport' | 'ph.national_id' | 'ph.nid' | 'global.passport';
|
|
1425
|
+
type UploadType = {
|
|
1426
|
+
/** Unique, host-defined id. Returned on results as `uploadTypeId`. */
|
|
1427
|
+
id: string;
|
|
1428
|
+
/**
|
|
1429
|
+
* Menu row label, localized by the host. Shown only when there are 2+ entries;
|
|
1430
|
+
* when missing or empty, `id` is shown instead.
|
|
1431
|
+
*/
|
|
1432
|
+
title: string;
|
|
1433
|
+
/**
|
|
1434
|
+
* false = the flow ends after this upload: the result has `isLastStep: true`, the remaining
|
|
1435
|
+
* steps are skipped, and the host closes the SDK (destroyView) in onStepDone.
|
|
1436
|
+
*/
|
|
1437
|
+
hasBackSide: boolean;
|
|
1438
|
+
};
|
|
1414
1439
|
type UploadFromDeviceConfig = {
|
|
1415
1440
|
enable: boolean;
|
|
1416
1441
|
enableConfirmPopup?: boolean;
|
|
1442
|
+
/**
|
|
1443
|
+
* Upload types offered by the upload button. Omitted or `[]` = one generic upload per side (as before).
|
|
1444
|
+
* 1 entry: the file picker opens directly. 2+ entries: a menu opens first.
|
|
1445
|
+
* Back side: the picker opens directly; the button shows only if an entry has `hasBackSide: true`.
|
|
1446
|
+
* A list with no valid entry hides the button. Invalid entries are dropped with a console.warn.
|
|
1447
|
+
*/
|
|
1448
|
+
uploadTypes?: UploadType[];
|
|
1417
1449
|
};
|
|
1418
1450
|
type ReadIDCardOptions = {
|
|
1419
1451
|
clientSettings: Record<string, any>;
|
|
@@ -1565,6 +1597,17 @@ type FaceAuthenticationOptions = (BaseFaceAuthenticationOptions & {
|
|
|
1565
1597
|
apiCheck?: false;
|
|
1566
1598
|
clientSettings: Record<string, any>;
|
|
1567
1599
|
});
|
|
1600
|
+
type CompareFacesOptions = {
|
|
1601
|
+
accessKey: string;
|
|
1602
|
+
secretKey: string;
|
|
1603
|
+
apiUrl: string;
|
|
1604
|
+
image1: string;
|
|
1605
|
+
image2: string;
|
|
1606
|
+
xRequestId?: string;
|
|
1607
|
+
xRequestId2?: string;
|
|
1608
|
+
onSuccess: (result: any) => void;
|
|
1609
|
+
onError: (error: any) => void;
|
|
1610
|
+
};
|
|
1568
1611
|
|
|
1569
1612
|
declare class BaseTVWebSDK {
|
|
1570
1613
|
#private;
|
|
@@ -1599,11 +1642,11 @@ declare class BaseTVWebSDK {
|
|
|
1599
1642
|
* @private
|
|
1600
1643
|
*/
|
|
1601
1644
|
setupBeforeRender: () => void;
|
|
1602
|
-
readIDCardWithApiCall(
|
|
1603
|
-
readIDCardUIOnly(
|
|
1604
|
-
livenessDetection(
|
|
1605
|
-
faceAuthentication(
|
|
1606
|
-
compareFaces({ accessKey, secretKey, apiUrl, image1, image2, onSuccess, onError }:
|
|
1645
|
+
readIDCardWithApiCall(options: ReadIDCardWithApiCallOptions): Promise<void>;
|
|
1646
|
+
readIDCardUIOnly(options: ReadIDCardOptions): Promise<void>;
|
|
1647
|
+
livenessDetection(options: LivenessDetectionOptions): Promise<void>;
|
|
1648
|
+
faceAuthentication(options: FaceAuthenticationOptions): Promise<void>;
|
|
1649
|
+
compareFaces({ accessKey, secretKey, apiUrl, image1, image2, xRequestId, xRequestId2, onSuccess, onError, }: CompareFacesOptions): void;
|
|
1607
1650
|
destroyView: () => void;
|
|
1608
1651
|
closeSDK: () => void;
|
|
1609
1652
|
}
|
|
@@ -1651,6 +1694,28 @@ declare const ScannerType: {
|
|
|
1651
1694
|
readonly QR_CODE: "qr_code";
|
|
1652
1695
|
};
|
|
1653
1696
|
|
|
1697
|
+
interface BlazefaceModel {
|
|
1698
|
+
load(params?: {
|
|
1699
|
+
modelUrl?: string;
|
|
1700
|
+
}): Promise<any>;
|
|
1701
|
+
}
|
|
1702
|
+
interface TFLite {
|
|
1703
|
+
loadTFLiteModel(data: Uint8Array, options?: Record<string, any>): Promise<any>;
|
|
1704
|
+
}
|
|
1705
|
+
interface TensorFlow {
|
|
1706
|
+
enableProdMode(): Promise<void>;
|
|
1707
|
+
setBackend(backend: string): Promise<void>;
|
|
1708
|
+
ready(): Promise<void>;
|
|
1709
|
+
}
|
|
1710
|
+
declare global {
|
|
1711
|
+
interface Window {
|
|
1712
|
+
tf: TensorFlow;
|
|
1713
|
+
blazeface: BlazefaceModel;
|
|
1714
|
+
tflite: TFLite;
|
|
1715
|
+
tv_model_backend_init?: string[];
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1654
1719
|
declare const defaultSteps: ({
|
|
1655
1720
|
scannerType: "id_card";
|
|
1656
1721
|
title: string;
|
|
@@ -1851,4 +1916,4 @@ declare class TVWebSDK extends BaseTVWebSDK {
|
|
|
1851
1916
|
}
|
|
1852
1917
|
|
|
1853
1918
|
export { index$1 as Constants, TVWebSDK as SDK, SDKAdapter, ScannerType, defaultClientSettings, defaultSteps as defaultReadIDCardSteps, getSDKVersion };
|
|
1854
|
-
export type { BaseTVWebSDKProps, FaceAuthenticationOptions, FaceAuthenticationResult, IDCardStep, LivenessDetectionDoneResult, LivenessDetectionOptions, ReadIDCardOptions, ReadIDCardResult, ReadIDCardWithApiCallOptions, VideoFrame };
|
|
1919
|
+
export type { BaseTVWebSDKProps, FaceAuthenticationOptions, FaceAuthenticationResult, IDCardStep, LivenessDetectionDoneResult, LivenessDetectionOptions, ReadIDCardOptions, ReadIDCardResult, ReadIDCardWithApiCallOptions, UploadFromDeviceConfig, UploadType, VideoFrame };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsocial/tvweb-sdk.platform",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.39.0",
|
|
4
4
|
"description": "TV Web SDK - The Standalone SDK",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Nha Hoang <nha.hoang@trustingsocial.com>",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@tsocial/tvweb-builder": "5.
|
|
33
|
-
"@tsocial/tvweb-core": "5.
|
|
34
|
-
"@tsocial/tvweb-ui": "5.
|
|
32
|
+
"@tsocial/tvweb-builder": "5.39.0",
|
|
33
|
+
"@tsocial/tvweb-core": "5.39.0",
|
|
34
|
+
"@tsocial/tvweb-ui": "5.39.0",
|
|
35
35
|
"invariant": "^2.2.4",
|
|
36
|
-
"react": "^
|
|
37
|
-
"react-dom": "^
|
|
36
|
+
"react": "^17.0.2",
|
|
37
|
+
"react-dom": "^17.0.2",
|
|
38
38
|
"styled-components": "^6.1.12"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "aba8c75e4b86a49cd75100a595e41d4c1ae05001"
|
|
41
41
|
}
|