@tsocial/tvweb-sdk.nbcci 0.0.0-beta.20251211-151717 → 0.0.0-beta.20251215-093759
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/types/index.d.ts
CHANGED
|
@@ -1234,6 +1234,30 @@ declare global {
|
|
|
1234
1234
|
tv_model_backend_init?: string[];
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
|
+
|
|
1238
|
+
type NestedPartial<T> = {
|
|
1239
|
+
[K in keyof T]?: T[K] extends object ? NestedPartial<T[K]> : T[K];
|
|
1240
|
+
};
|
|
1241
|
+
type IdCardModelUrlsWithModelName = Record<keyof typeof IdCardModelName, string>;
|
|
1242
|
+
type TfScriptUrls = {
|
|
1243
|
+
tfUrl: string;
|
|
1244
|
+
tfBackendWasmUrl: string;
|
|
1245
|
+
tfBackendCpuUrl: string;
|
|
1246
|
+
tfBackendWebGlUrl: string;
|
|
1247
|
+
tfLiteUrl: string;
|
|
1248
|
+
blazefaceScriptUrl: string;
|
|
1249
|
+
};
|
|
1250
|
+
type ResourceUrls = {
|
|
1251
|
+
blazefaceModelUrl: string;
|
|
1252
|
+
opencvUrl: string;
|
|
1253
|
+
opencvWasmUrl: string;
|
|
1254
|
+
idCardModelUrl: string;
|
|
1255
|
+
wechatQRModelsUrl: string;
|
|
1256
|
+
closeEyesModelUrl: string;
|
|
1257
|
+
qualifyModelUrl: string;
|
|
1258
|
+
tfScriptUrls: TfScriptUrls;
|
|
1259
|
+
idCardModelUrls: IdCardModelUrlsWithModelName;
|
|
1260
|
+
};
|
|
1237
1261
|
/**
|
|
1238
1262
|
* Interface for configuring service settings. All properties are optional.
|
|
1239
1263
|
*/
|
|
@@ -1274,13 +1298,13 @@ type BaseTVWebSDKProps = {
|
|
|
1274
1298
|
lang?: 'vi' | 'en' | 'es-mx';
|
|
1275
1299
|
assetRoot?: string;
|
|
1276
1300
|
resourceRoot?: string;
|
|
1277
|
-
customUrls?:
|
|
1301
|
+
customUrls?: NestedPartial<ResourceUrls>;
|
|
1278
1302
|
enableAntiDebug?: boolean;
|
|
1279
|
-
warmupMessage
|
|
1280
|
-
baseComponent
|
|
1303
|
+
warmupMessage?: string;
|
|
1304
|
+
baseComponent?: Record<string, any>;
|
|
1281
1305
|
component?: Record<string, any>;
|
|
1282
1306
|
country?: 'vn' | 'ph';
|
|
1283
|
-
idCardContext
|
|
1307
|
+
idCardContext?: Record<string, any>;
|
|
1284
1308
|
exifKey?: string;
|
|
1285
1309
|
themeVersion?: 'v1' | 'v2';
|
|
1286
1310
|
enableVoice?: boolean;
|
|
@@ -1350,7 +1374,13 @@ type APICredentials = {
|
|
|
1350
1374
|
fallbackUrls?: string[];
|
|
1351
1375
|
};
|
|
1352
1376
|
type LogCredentials = APICredentials & {
|
|
1353
|
-
userId
|
|
1377
|
+
userId?: string;
|
|
1378
|
+
enable?: boolean;
|
|
1379
|
+
logSignature?: {
|
|
1380
|
+
timestamp: string;
|
|
1381
|
+
signature: string;
|
|
1382
|
+
logUrl: string;
|
|
1383
|
+
};
|
|
1354
1384
|
};
|
|
1355
1385
|
type ErrorObject = {
|
|
1356
1386
|
code: string;
|
|
@@ -1383,10 +1413,11 @@ type ReadIDCardOptions = {
|
|
|
1383
1413
|
customTexts?: CustomTexts;
|
|
1384
1414
|
customErrors?: CustomErrors;
|
|
1385
1415
|
};
|
|
1386
|
-
type ReadIDCardWithApiCallOptions = ReadIDCardOptions & {
|
|
1416
|
+
type ReadIDCardWithApiCallOptions = Omit<ReadIDCardOptions, 'clientSettings'> & {
|
|
1387
1417
|
apiCredentials: APICredentials;
|
|
1388
1418
|
serviceSettings?: ServiceSettings;
|
|
1389
1419
|
flowId?: FlowId;
|
|
1420
|
+
clientSettings?: Record<string, any>;
|
|
1390
1421
|
};
|
|
1391
1422
|
type LivenessDetectionDoneResult = {};
|
|
1392
1423
|
type Frame = {
|
|
@@ -1395,12 +1426,10 @@ type Frame = {
|
|
|
1395
1426
|
metadata: string;
|
|
1396
1427
|
index: number;
|
|
1397
1428
|
};
|
|
1398
|
-
type
|
|
1429
|
+
type BaseLivenessDetectionOptions = {
|
|
1399
1430
|
mode: typeof Mode[keyof typeof Mode];
|
|
1400
1431
|
onLivenessDetectionDone: (result: LivenessDetectionDoneResult) => void;
|
|
1401
1432
|
onError: (error: ErrorObject) => void;
|
|
1402
|
-
clientSettings: Record<string, any>;
|
|
1403
|
-
apiCheck?: boolean;
|
|
1404
1433
|
apiCredentials?: APICredentials;
|
|
1405
1434
|
customErrors?: CustomErrors;
|
|
1406
1435
|
onProcessing?: () => void;
|
|
@@ -1418,6 +1447,13 @@ type LivenessDetectionOptions = {
|
|
|
1418
1447
|
serviceSettings?: ServiceSettings;
|
|
1419
1448
|
flowId?: FlowId;
|
|
1420
1449
|
};
|
|
1450
|
+
type LivenessDetectionOptions = (BaseLivenessDetectionOptions & {
|
|
1451
|
+
apiCheck: true;
|
|
1452
|
+
clientSettings?: Record<string, any>;
|
|
1453
|
+
}) | (BaseLivenessDetectionOptions & {
|
|
1454
|
+
apiCheck?: false;
|
|
1455
|
+
clientSettings: Record<string, any>;
|
|
1456
|
+
});
|
|
1421
1457
|
type FaceImage = {
|
|
1422
1458
|
id?: string;
|
|
1423
1459
|
base64?: string;
|
|
@@ -1450,17 +1486,15 @@ type FaceAuthenticationResult = {
|
|
|
1450
1486
|
faceType?: 'selfie' | 'id_card' | null;
|
|
1451
1487
|
apiResult?: any;
|
|
1452
1488
|
};
|
|
1453
|
-
type
|
|
1489
|
+
type BaseFaceAuthenticationOptions = {
|
|
1454
1490
|
mode: typeof FaceAuthenticationMode[keyof typeof FaceAuthenticationMode];
|
|
1455
1491
|
authMethod: typeof FaceAuthMethod[keyof typeof FaceAuthMethod];
|
|
1456
1492
|
onDone: (result: FaceAuthenticationResult) => void;
|
|
1457
1493
|
onError: (error: ErrorObject) => void;
|
|
1458
|
-
onReset?: () => void;
|
|
1459
|
-
clientSettings: Record<string, any>;
|
|
1460
|
-
apiCheck?: boolean;
|
|
1461
1494
|
apiCredentials?: APICredentials;
|
|
1462
|
-
|
|
1463
|
-
|
|
1495
|
+
customErrors?: CustomErrors;
|
|
1496
|
+
onProcessing?: () => void;
|
|
1497
|
+
onReset?: () => void;
|
|
1464
1498
|
captureFrameSettings?: {
|
|
1465
1499
|
enable: boolean;
|
|
1466
1500
|
framesIntervalTime: number;
|
|
@@ -1469,14 +1503,24 @@ type FaceAuthenticationOptions = {
|
|
|
1469
1503
|
onFramesCaptured?: (frames: Frame[]) => void;
|
|
1470
1504
|
outputEncryptionSettings?: OutputEncryptionSettings;
|
|
1471
1505
|
logCredentials?: LogCredentials;
|
|
1472
|
-
flowId?: FlowId;
|
|
1473
|
-
serviceSettings?: ServiceSettings;
|
|
1474
1506
|
customTexts?: CustomTexts;
|
|
1507
|
+
onClose?: () => void;
|
|
1508
|
+
serviceSettings?: ServiceSettings;
|
|
1509
|
+
flowId?: FlowId;
|
|
1475
1510
|
};
|
|
1511
|
+
type FaceAuthenticationOptions = (BaseFaceAuthenticationOptions & {
|
|
1512
|
+
apiCheck: true;
|
|
1513
|
+
clientSettings?: Record<string, any>;
|
|
1514
|
+
}) | (BaseFaceAuthenticationOptions & {
|
|
1515
|
+
apiCheck?: false;
|
|
1516
|
+
clientSettings: Record<string, any>;
|
|
1517
|
+
});
|
|
1476
1518
|
|
|
1477
1519
|
declare class BaseTVWebSDK {
|
|
1520
|
+
#private;
|
|
1478
1521
|
container: HTMLElement;
|
|
1479
1522
|
component: Record<string, any>;
|
|
1523
|
+
commonSettings: Record<string, any>;
|
|
1480
1524
|
constructor(constructorProps: BaseTVWebSDKProps);
|
|
1481
1525
|
/**
|
|
1482
1526
|
* Check the ability to open the camera of the current device.
|
|
@@ -1547,12 +1591,12 @@ declare class SDKAdapter {
|
|
|
1547
1591
|
}
|
|
1548
1592
|
|
|
1549
1593
|
declare const ScannerType: {
|
|
1550
|
-
ID_CARD:
|
|
1551
|
-
QR_CODE:
|
|
1594
|
+
readonly ID_CARD: "id_card";
|
|
1595
|
+
readonly QR_CODE: "qr_code";
|
|
1552
1596
|
};
|
|
1553
1597
|
|
|
1554
1598
|
declare const defaultSteps: ({
|
|
1555
|
-
scannerType:
|
|
1599
|
+
scannerType: "id_card";
|
|
1556
1600
|
title: string;
|
|
1557
1601
|
description: string;
|
|
1558
1602
|
titleIcon: string;
|
|
@@ -1560,7 +1604,7 @@ declare const defaultSteps: ({
|
|
|
1560
1604
|
cardType: "vn.national_id";
|
|
1561
1605
|
enableConfirmPopup: boolean;
|
|
1562
1606
|
} | {
|
|
1563
|
-
scannerType:
|
|
1607
|
+
scannerType: "id_card";
|
|
1564
1608
|
title: string;
|
|
1565
1609
|
description: string;
|
|
1566
1610
|
titleIcon: string;
|
|
@@ -1746,7 +1790,7 @@ declare namespace defaultClientSettings {
|
|
|
1746
1790
|
}
|
|
1747
1791
|
|
|
1748
1792
|
declare class TVWebSDK extends BaseTVWebSDK {
|
|
1749
|
-
constructor(props:
|
|
1793
|
+
constructor(props: BaseTVWebSDKProps);
|
|
1750
1794
|
}
|
|
1751
1795
|
|
|
1752
1796
|
export { index$1 as Constants, TVWebSDK as SDK, SDKAdapter, ScannerType, defaultClientSettings, defaultSteps as defaultReadIDCardSteps, getSDKVersion };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsocial/tvweb-sdk.nbcci",
|
|
3
|
-
"version": "0.0.0-beta.
|
|
3
|
+
"version": "0.0.0-beta.20251215-093759",
|
|
4
4
|
"description": "TV Web SDK - The Standalone SDK",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Nha Hoang <nha.hoang@trustingsocial.com>",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@tsocial/trustvision-sdk": "2.12.4",
|
|
33
|
-
"@tsocial/tvweb-builder": "0.0.0-beta.
|
|
34
|
-
"@tsocial/tvweb-core": "0.0.0-beta.
|
|
35
|
-
"@tsocial/tvweb-ui": "0.0.0-beta.
|
|
33
|
+
"@tsocial/tvweb-builder": "0.0.0-beta.20251215-093759",
|
|
34
|
+
"@tsocial/tvweb-core": "0.0.0-beta.20251215-093759",
|
|
35
|
+
"@tsocial/tvweb-ui": "0.0.0-beta.20251215-093759",
|
|
36
36
|
"invariant": "^2.2.4",
|
|
37
37
|
"react": "^16.14.0",
|
|
38
38
|
"react-app-polyfill": "^2.0.0",
|
|
39
39
|
"react-dom": "^16.14.0",
|
|
40
40
|
"styled-components": "^6.1.12"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "2f889fe8ea9777b8379e3f440879d18a47aea19f"
|
|
43
43
|
}
|