@tsocial/tvweb-sdk.omg 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.
package/build/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const ScannerType: {
|
|
2
|
-
ID_CARD:
|
|
3
|
-
QR_CODE:
|
|
2
|
+
readonly ID_CARD: "id_card";
|
|
3
|
+
readonly QR_CODE: "qr_code";
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
declare const defaultSteps: ({
|
|
7
|
-
scannerType:
|
|
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:
|
|
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?:
|
|
1500
|
+
customUrls?: NestedPartial<ResourceUrls>;
|
|
1477
1501
|
enableAntiDebug?: boolean;
|
|
1478
|
-
warmupMessage
|
|
1479
|
-
baseComponent
|
|
1502
|
+
warmupMessage?: string;
|
|
1503
|
+
baseComponent?: Record<string, any>;
|
|
1480
1504
|
component?: Record<string, any>;
|
|
1481
1505
|
country?: 'vn' | 'ph';
|
|
1482
|
-
idCardContext
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
1662
|
-
|
|
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.
|
|
@@ -1746,10 +1790,10 @@ declare class SDKAdapter {
|
|
|
1746
1790
|
}
|
|
1747
1791
|
|
|
1748
1792
|
declare class TVWebSDK extends BaseTVWebSDK {
|
|
1749
|
-
constructor(props:
|
|
1750
|
-
livenessDetection(props:
|
|
1751
|
-
readIDCardUIOnly(props:
|
|
1752
|
-
readIDCardWithApiCall(props:
|
|
1793
|
+
constructor(props: BaseTVWebSDKProps);
|
|
1794
|
+
livenessDetection(props: LivenessDetectionOptions): void;
|
|
1795
|
+
readIDCardUIOnly(props: ReadIDCardOptions): void;
|
|
1796
|
+
readIDCardWithApiCall(props: ReadIDCardWithApiCallOptions): void;
|
|
1753
1797
|
}
|
|
1754
1798
|
|
|
1755
1799
|
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.omg",
|
|
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
|
"license": "ISC",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@tsocial/trustvision-sdk": "2.12.4",
|
|
31
|
-
"@tsocial/tvweb-builder": "0.0.0-beta.20251211-
|
|
32
|
-
"@tsocial/tvweb-core": "0.0.0-beta.20251211-
|
|
33
|
-
"@tsocial/tvweb-ui": "0.0.0-beta.20251211-
|
|
31
|
+
"@tsocial/tvweb-builder": "0.0.0-beta.20251211-162126",
|
|
32
|
+
"@tsocial/tvweb-core": "0.0.0-beta.20251211-162126",
|
|
33
|
+
"@tsocial/tvweb-ui": "0.0.0-beta.20251211-162126",
|
|
34
34
|
"invariant": "^2.2.4",
|
|
35
35
|
"react": "^16.14.0",
|
|
36
36
|
"react-app-polyfill": "^2.0.0",
|
|
37
37
|
"react-dom": "^16.14.0",
|
|
38
38
|
"styled-components": "^6.1.12"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "94ed3819a64f6c8930910845545ba62e6331d914"
|
|
41
41
|
}
|