@tsocial/tvweb-sdk.msb 0.0.0-beta.20251211-151717 → 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.
@@ -1,10 +1,10 @@
1
1
  declare const ScannerType: {
2
- ID_CARD: string;
3
- QR_CODE: string;
2
+ readonly ID_CARD: "id_card";
3
+ readonly QR_CODE: "qr_code";
4
4
  };
5
5
 
6
6
  declare const defaultSteps: ({
7
- scannerType: string;
7
+ scannerType: "id_card";
8
8
  title: string;
9
9
  description: string;
10
10
  titleIcon: string;
@@ -12,7 +12,7 @@ declare const defaultSteps: ({
12
12
  cardType: "vn.national_id";
13
13
  enableConfirmPopup: boolean;
14
14
  } | {
15
- scannerType: string;
15
+ scannerType: "id_card";
16
16
  title: string;
17
17
  description: string;
18
18
  titleIcon: string;
@@ -1433,6 +1433,30 @@ declare global {
1433
1433
  tv_model_backend_init?: string[];
1434
1434
  }
1435
1435
  }
1436
+
1437
+ type NestedPartial<T> = {
1438
+ [K in keyof T]?: T[K] extends object ? NestedPartial<T[K]> : T[K];
1439
+ };
1440
+ type IdCardModelUrlsWithModelName = Record<keyof typeof IdCardModelName, string>;
1441
+ type TfScriptUrls = {
1442
+ tfUrl: string;
1443
+ tfBackendWasmUrl: string;
1444
+ tfBackendCpuUrl: string;
1445
+ tfBackendWebGlUrl: string;
1446
+ tfLiteUrl: string;
1447
+ blazefaceScriptUrl: string;
1448
+ };
1449
+ type ResourceUrls = {
1450
+ blazefaceModelUrl: string;
1451
+ opencvUrl: string;
1452
+ opencvWasmUrl: string;
1453
+ idCardModelUrl: string;
1454
+ wechatQRModelsUrl: string;
1455
+ closeEyesModelUrl: string;
1456
+ qualifyModelUrl: string;
1457
+ tfScriptUrls: TfScriptUrls;
1458
+ idCardModelUrls: IdCardModelUrlsWithModelName;
1459
+ };
1436
1460
  /**
1437
1461
  * Interface for configuring service settings. All properties are optional.
1438
1462
  */
@@ -1473,13 +1497,13 @@ type BaseTVWebSDKProps = {
1473
1497
  lang?: 'vi' | 'en' | 'es-mx';
1474
1498
  assetRoot?: string;
1475
1499
  resourceRoot?: string;
1476
- customUrls?: Record<string, string>;
1500
+ customUrls?: NestedPartial<ResourceUrls>;
1477
1501
  enableAntiDebug?: boolean;
1478
- warmupMessage: string;
1479
- baseComponent: Record<string, any>;
1502
+ warmupMessage?: string;
1503
+ baseComponent?: Record<string, any>;
1480
1504
  component?: Record<string, any>;
1481
1505
  country?: 'vn' | 'ph';
1482
- idCardContext: Record<string, any>;
1506
+ idCardContext?: Record<string, any>;
1483
1507
  exifKey?: string;
1484
1508
  themeVersion?: 'v1' | 'v2';
1485
1509
  enableVoice?: boolean;
@@ -1549,7 +1573,13 @@ type APICredentials = {
1549
1573
  fallbackUrls?: string[];
1550
1574
  };
1551
1575
  type LogCredentials = APICredentials & {
1552
- userId: string;
1576
+ userId?: string;
1577
+ enable?: boolean;
1578
+ logSignature?: {
1579
+ timestamp: string;
1580
+ signature: string;
1581
+ logUrl: string;
1582
+ };
1553
1583
  };
1554
1584
  type ErrorObject = {
1555
1585
  code: string;
@@ -1582,10 +1612,11 @@ type ReadIDCardOptions = {
1582
1612
  customTexts?: CustomTexts;
1583
1613
  customErrors?: CustomErrors;
1584
1614
  };
1585
- type ReadIDCardWithApiCallOptions = ReadIDCardOptions & {
1615
+ type ReadIDCardWithApiCallOptions = Omit<ReadIDCardOptions, 'clientSettings'> & {
1586
1616
  apiCredentials: APICredentials;
1587
1617
  serviceSettings?: ServiceSettings;
1588
1618
  flowId?: FlowId;
1619
+ clientSettings?: Record<string, any>;
1589
1620
  };
1590
1621
  type LivenessDetectionDoneResult = {};
1591
1622
  type Frame = {
@@ -1594,12 +1625,10 @@ type Frame = {
1594
1625
  metadata: string;
1595
1626
  index: number;
1596
1627
  };
1597
- type LivenessDetectionOptions = {
1628
+ type BaseLivenessDetectionOptions = {
1598
1629
  mode: typeof Mode[keyof typeof Mode];
1599
1630
  onLivenessDetectionDone: (result: LivenessDetectionDoneResult) => void;
1600
1631
  onError: (error: ErrorObject) => void;
1601
- clientSettings: Record<string, any>;
1602
- apiCheck?: boolean;
1603
1632
  apiCredentials?: APICredentials;
1604
1633
  customErrors?: CustomErrors;
1605
1634
  onProcessing?: () => void;
@@ -1617,6 +1646,13 @@ type LivenessDetectionOptions = {
1617
1646
  serviceSettings?: ServiceSettings;
1618
1647
  flowId?: FlowId;
1619
1648
  };
1649
+ type LivenessDetectionOptions = (BaseLivenessDetectionOptions & {
1650
+ apiCheck: true;
1651
+ clientSettings?: Record<string, any>;
1652
+ }) | (BaseLivenessDetectionOptions & {
1653
+ apiCheck?: false;
1654
+ clientSettings: Record<string, any>;
1655
+ });
1620
1656
  type FaceImage = {
1621
1657
  id?: string;
1622
1658
  base64?: string;
@@ -1649,17 +1685,15 @@ type FaceAuthenticationResult = {
1649
1685
  faceType?: 'selfie' | 'id_card' | null;
1650
1686
  apiResult?: any;
1651
1687
  };
1652
- type FaceAuthenticationOptions = {
1688
+ type BaseFaceAuthenticationOptions = {
1653
1689
  mode: typeof FaceAuthenticationMode[keyof typeof FaceAuthenticationMode];
1654
1690
  authMethod: typeof FaceAuthMethod[keyof typeof FaceAuthMethod];
1655
1691
  onDone: (result: FaceAuthenticationResult) => void;
1656
1692
  onError: (error: ErrorObject) => void;
1657
- onReset?: () => void;
1658
- clientSettings: Record<string, any>;
1659
- apiCheck?: boolean;
1660
1693
  apiCredentials?: APICredentials;
1661
- onClose?: () => void;
1662
- authType?: string;
1694
+ customErrors?: CustomErrors;
1695
+ onProcessing?: () => void;
1696
+ onReset?: () => void;
1663
1697
  captureFrameSettings?: {
1664
1698
  enable: boolean;
1665
1699
  framesIntervalTime: number;
@@ -1668,14 +1702,24 @@ type FaceAuthenticationOptions = {
1668
1702
  onFramesCaptured?: (frames: Frame[]) => void;
1669
1703
  outputEncryptionSettings?: OutputEncryptionSettings;
1670
1704
  logCredentials?: LogCredentials;
1671
- flowId?: FlowId;
1672
- serviceSettings?: ServiceSettings;
1673
1705
  customTexts?: CustomTexts;
1706
+ onClose?: () => void;
1707
+ serviceSettings?: ServiceSettings;
1708
+ flowId?: FlowId;
1674
1709
  };
1710
+ type FaceAuthenticationOptions = (BaseFaceAuthenticationOptions & {
1711
+ apiCheck: true;
1712
+ clientSettings?: Record<string, any>;
1713
+ }) | (BaseFaceAuthenticationOptions & {
1714
+ apiCheck?: false;
1715
+ clientSettings: Record<string, any>;
1716
+ });
1675
1717
 
1676
1718
  declare class BaseTVWebSDK {
1719
+ #private;
1677
1720
  container: HTMLElement;
1678
1721
  component: Record<string, any>;
1722
+ commonSettings: Record<string, any>;
1679
1723
  constructor(constructorProps: BaseTVWebSDKProps);
1680
1724
  /**
1681
1725
  * Check the ability to open the camera of the current device.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsocial/tvweb-sdk.msb",
3
- "version": "0.0.0-beta.20251211-151717",
3
+ "version": "0.0.0-beta.20251211-162126",
4
4
  "description": "TV Web SDK - The Standalone MSB SDK",
5
5
  "keywords": [],
6
6
  "author": "Nha Hoang <nha.hoang@trustingsocial.com>, Son T. Ng <son.nguyen.thai@trustingsocial.com>",
@@ -29,14 +29,14 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@tsocial/trustvision-sdk": "2.12.4",
32
- "@tsocial/tvweb-builder": "0.0.0-beta.20251211-151717",
33
- "@tsocial/tvweb-core": "0.0.0-beta.20251211-151717",
34
- "@tsocial/tvweb-ui": "0.0.0-beta.20251211-151717",
32
+ "@tsocial/tvweb-builder": "0.0.0-beta.20251211-162126",
33
+ "@tsocial/tvweb-core": "0.0.0-beta.20251211-162126",
34
+ "@tsocial/tvweb-ui": "0.0.0-beta.20251211-162126",
35
35
  "invariant": "^2.2.4",
36
36
  "react": "^16.14.0",
37
37
  "react-app-polyfill": "^2.0.0",
38
38
  "react-dom": "^16.14.0",
39
39
  "styled-components": "^6.1.12"
40
40
  },
41
- "gitHead": "fddbb19f97d43bf4d63b8738fe249db64ef6c6f2"
41
+ "gitHead": "94ed3819a64f6c8930910845545ba62e6331d914"
42
42
  }