@tsocial/tvweb-sdk.nbcci 0.0.0-beta.20251211-144711 → 0.0.0-beta.20251211-162126
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
|
@@ -1210,8 +1210,9 @@ declare const _default: {
|
|
|
1210
1210
|
'passive_liveness_v2.instruction.capturing_done': string;
|
|
1211
1211
|
};
|
|
1212
1212
|
type Translation = typeof _default;
|
|
1213
|
-
|
|
1214
|
-
|
|
1213
|
+
type CustomTexts = Partial<Translation> & {
|
|
1214
|
+
[key: string]: string;
|
|
1215
|
+
};
|
|
1215
1216
|
interface BlazefaceModel {
|
|
1216
1217
|
load(params?: {
|
|
1217
1218
|
modelUrl?: string;
|
|
@@ -1233,6 +1234,30 @@ declare global {
|
|
|
1233
1234
|
tv_model_backend_init?: string[];
|
|
1234
1235
|
}
|
|
1235
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
|
+
};
|
|
1236
1261
|
/**
|
|
1237
1262
|
* Interface for configuring service settings. All properties are optional.
|
|
1238
1263
|
*/
|
|
@@ -1273,12 +1298,13 @@ type BaseTVWebSDKProps = {
|
|
|
1273
1298
|
lang?: 'vi' | 'en' | 'es-mx';
|
|
1274
1299
|
assetRoot?: string;
|
|
1275
1300
|
resourceRoot?: string;
|
|
1276
|
-
customUrls?:
|
|
1301
|
+
customUrls?: NestedPartial<ResourceUrls>;
|
|
1277
1302
|
enableAntiDebug?: boolean;
|
|
1278
|
-
warmupMessage
|
|
1279
|
-
baseComponent
|
|
1303
|
+
warmupMessage?: string;
|
|
1304
|
+
baseComponent?: Record<string, any>;
|
|
1305
|
+
component?: Record<string, any>;
|
|
1280
1306
|
country?: 'vn' | 'ph';
|
|
1281
|
-
idCardContext
|
|
1307
|
+
idCardContext?: Record<string, any>;
|
|
1282
1308
|
exifKey?: string;
|
|
1283
1309
|
themeVersion?: 'v1' | 'v2';
|
|
1284
1310
|
enableVoice?: boolean;
|
|
@@ -1348,7 +1374,13 @@ type APICredentials = {
|
|
|
1348
1374
|
fallbackUrls?: string[];
|
|
1349
1375
|
};
|
|
1350
1376
|
type LogCredentials = APICredentials & {
|
|
1351
|
-
userId
|
|
1377
|
+
userId?: string;
|
|
1378
|
+
enable?: boolean;
|
|
1379
|
+
logSignature?: {
|
|
1380
|
+
timestamp: string;
|
|
1381
|
+
signature: string;
|
|
1382
|
+
logUrl: string;
|
|
1383
|
+
};
|
|
1352
1384
|
};
|
|
1353
1385
|
type ErrorObject = {
|
|
1354
1386
|
code: string;
|
|
@@ -1381,10 +1413,11 @@ type ReadIDCardOptions = {
|
|
|
1381
1413
|
customTexts?: CustomTexts;
|
|
1382
1414
|
customErrors?: CustomErrors;
|
|
1383
1415
|
};
|
|
1384
|
-
type ReadIDCardWithApiCallOptions = ReadIDCardOptions & {
|
|
1416
|
+
type ReadIDCardWithApiCallOptions = Omit<ReadIDCardOptions, 'clientSettings'> & {
|
|
1385
1417
|
apiCredentials: APICredentials;
|
|
1386
1418
|
serviceSettings?: ServiceSettings;
|
|
1387
1419
|
flowId?: FlowId;
|
|
1420
|
+
clientSettings?: Record<string, any>;
|
|
1388
1421
|
};
|
|
1389
1422
|
type LivenessDetectionDoneResult = {};
|
|
1390
1423
|
type Frame = {
|
|
@@ -1393,12 +1426,10 @@ type Frame = {
|
|
|
1393
1426
|
metadata: string;
|
|
1394
1427
|
index: number;
|
|
1395
1428
|
};
|
|
1396
|
-
type
|
|
1429
|
+
type BaseLivenessDetectionOptions = {
|
|
1397
1430
|
mode: typeof Mode[keyof typeof Mode];
|
|
1398
1431
|
onLivenessDetectionDone: (result: LivenessDetectionDoneResult) => void;
|
|
1399
1432
|
onError: (error: ErrorObject) => void;
|
|
1400
|
-
clientSettings: Record<string, any>;
|
|
1401
|
-
apiCheck?: boolean;
|
|
1402
1433
|
apiCredentials?: APICredentials;
|
|
1403
1434
|
customErrors?: CustomErrors;
|
|
1404
1435
|
onProcessing?: () => void;
|
|
@@ -1416,6 +1447,13 @@ type LivenessDetectionOptions = {
|
|
|
1416
1447
|
serviceSettings?: ServiceSettings;
|
|
1417
1448
|
flowId?: FlowId;
|
|
1418
1449
|
};
|
|
1450
|
+
type LivenessDetectionOptions = (BaseLivenessDetectionOptions & {
|
|
1451
|
+
apiCheck: true;
|
|
1452
|
+
clientSettings?: Record<string, any>;
|
|
1453
|
+
}) | (BaseLivenessDetectionOptions & {
|
|
1454
|
+
apiCheck?: false;
|
|
1455
|
+
clientSettings: Record<string, any>;
|
|
1456
|
+
});
|
|
1419
1457
|
type FaceImage = {
|
|
1420
1458
|
id?: string;
|
|
1421
1459
|
base64?: string;
|
|
@@ -1448,17 +1486,15 @@ type FaceAuthenticationResult = {
|
|
|
1448
1486
|
faceType?: 'selfie' | 'id_card' | null;
|
|
1449
1487
|
apiResult?: any;
|
|
1450
1488
|
};
|
|
1451
|
-
type
|
|
1489
|
+
type BaseFaceAuthenticationOptions = {
|
|
1452
1490
|
mode: typeof FaceAuthenticationMode[keyof typeof FaceAuthenticationMode];
|
|
1453
1491
|
authMethod: typeof FaceAuthMethod[keyof typeof FaceAuthMethod];
|
|
1454
1492
|
onDone: (result: FaceAuthenticationResult) => void;
|
|
1455
1493
|
onError: (error: ErrorObject) => void;
|
|
1456
|
-
onReset?: () => void;
|
|
1457
|
-
clientSettings: Record<string, any>;
|
|
1458
|
-
apiCheck?: boolean;
|
|
1459
1494
|
apiCredentials?: APICredentials;
|
|
1460
|
-
|
|
1461
|
-
|
|
1495
|
+
customErrors?: CustomErrors;
|
|
1496
|
+
onProcessing?: () => void;
|
|
1497
|
+
onReset?: () => void;
|
|
1462
1498
|
captureFrameSettings?: {
|
|
1463
1499
|
enable: boolean;
|
|
1464
1500
|
framesIntervalTime: number;
|
|
@@ -1467,13 +1503,24 @@ type FaceAuthenticationOptions = {
|
|
|
1467
1503
|
onFramesCaptured?: (frames: Frame[]) => void;
|
|
1468
1504
|
outputEncryptionSettings?: OutputEncryptionSettings;
|
|
1469
1505
|
logCredentials?: LogCredentials;
|
|
1470
|
-
flowId?: FlowId;
|
|
1471
|
-
serviceSettings?: ServiceSettings;
|
|
1472
1506
|
customTexts?: CustomTexts;
|
|
1507
|
+
onClose?: () => void;
|
|
1508
|
+
serviceSettings?: ServiceSettings;
|
|
1509
|
+
flowId?: FlowId;
|
|
1473
1510
|
};
|
|
1511
|
+
type FaceAuthenticationOptions = (BaseFaceAuthenticationOptions & {
|
|
1512
|
+
apiCheck: true;
|
|
1513
|
+
clientSettings?: Record<string, any>;
|
|
1514
|
+
}) | (BaseFaceAuthenticationOptions & {
|
|
1515
|
+
apiCheck?: false;
|
|
1516
|
+
clientSettings: Record<string, any>;
|
|
1517
|
+
});
|
|
1474
1518
|
|
|
1475
1519
|
declare class BaseTVWebSDK {
|
|
1520
|
+
#private;
|
|
1476
1521
|
container: HTMLElement;
|
|
1522
|
+
component: Record<string, any>;
|
|
1523
|
+
commonSettings: Record<string, any>;
|
|
1477
1524
|
constructor(constructorProps: BaseTVWebSDKProps);
|
|
1478
1525
|
/**
|
|
1479
1526
|
* Check the ability to open the camera of the current device.
|
|
@@ -1544,12 +1591,12 @@ declare class SDKAdapter {
|
|
|
1544
1591
|
}
|
|
1545
1592
|
|
|
1546
1593
|
declare const ScannerType: {
|
|
1547
|
-
ID_CARD:
|
|
1548
|
-
QR_CODE:
|
|
1594
|
+
readonly ID_CARD: "id_card";
|
|
1595
|
+
readonly QR_CODE: "qr_code";
|
|
1549
1596
|
};
|
|
1550
1597
|
|
|
1551
1598
|
declare const defaultSteps: ({
|
|
1552
|
-
scannerType:
|
|
1599
|
+
scannerType: "id_card";
|
|
1553
1600
|
title: string;
|
|
1554
1601
|
description: string;
|
|
1555
1602
|
titleIcon: string;
|
|
@@ -1557,7 +1604,7 @@ declare const defaultSteps: ({
|
|
|
1557
1604
|
cardType: "vn.national_id";
|
|
1558
1605
|
enableConfirmPopup: boolean;
|
|
1559
1606
|
} | {
|
|
1560
|
-
scannerType:
|
|
1607
|
+
scannerType: "id_card";
|
|
1561
1608
|
title: string;
|
|
1562
1609
|
description: string;
|
|
1563
1610
|
titleIcon: string;
|
|
@@ -1743,7 +1790,7 @@ declare namespace defaultClientSettings {
|
|
|
1743
1790
|
}
|
|
1744
1791
|
|
|
1745
1792
|
declare class TVWebSDK extends BaseTVWebSDK {
|
|
1746
|
-
constructor(props:
|
|
1793
|
+
constructor(props: BaseTVWebSDKProps);
|
|
1747
1794
|
}
|
|
1748
1795
|
|
|
1749
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.20251211-
|
|
3
|
+
"version": "0.0.0-beta.20251211-162126",
|
|
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.20251211-
|
|
34
|
-
"@tsocial/tvweb-core": "0.0.0-beta.20251211-
|
|
35
|
-
"@tsocial/tvweb-ui": "0.0.0-beta.20251211-
|
|
33
|
+
"@tsocial/tvweb-builder": "0.0.0-beta.20251211-162126",
|
|
34
|
+
"@tsocial/tvweb-core": "0.0.0-beta.20251211-162126",
|
|
35
|
+
"@tsocial/tvweb-ui": "0.0.0-beta.20251211-162126",
|
|
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": "94ed3819a64f6c8930910845545ba62e6331d914"
|
|
43
43
|
}
|