@tsocial/tvweb-sdk-types 5.38.6 → 5.40.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/index.d.ts +183 -157
- package/package.json +3 -3
package/build/index.d.ts
CHANGED
|
@@ -1159,6 +1159,7 @@ declare const _default: {
|
|
|
1159
1159
|
upload_invalid_file_type: string;
|
|
1160
1160
|
upload_processing_failed: string;
|
|
1161
1161
|
image_preview_unavailable: string;
|
|
1162
|
+
upload_type_menu_label: string;
|
|
1162
1163
|
front_card_title: string;
|
|
1163
1164
|
back_card_title: string;
|
|
1164
1165
|
front_card_description: string;
|
|
@@ -1331,6 +1332,13 @@ type ReadIDCardResult = {
|
|
|
1331
1332
|
cardSide: 'front' | 'back';
|
|
1332
1333
|
cardType: string;
|
|
1333
1334
|
source?: 'capture' | 'upload';
|
|
1335
|
+
/** Id of the upload type the image was uploaded with (uploads only). A back-side upload inherits the front's type. */
|
|
1336
|
+
uploadTypeId?: string;
|
|
1337
|
+
/**
|
|
1338
|
+
* True when no further step will run (last configured step, or an upload type with `hasBackSide: false`).
|
|
1339
|
+
* Close the SDK when true.
|
|
1340
|
+
*/
|
|
1341
|
+
isLastStep: boolean;
|
|
1334
1342
|
image: {
|
|
1335
1343
|
blob: Blob;
|
|
1336
1344
|
encrypted?: {
|
|
@@ -1385,8 +1393,11 @@ type APICredentials = {
|
|
|
1385
1393
|
secretKey: string;
|
|
1386
1394
|
apiUrl: string;
|
|
1387
1395
|
fallbackUrls?: string[];
|
|
1396
|
+
xRequestId?: string;
|
|
1397
|
+
xRequestId2?: string;
|
|
1388
1398
|
};
|
|
1389
1399
|
type LogCredentials = APICredentials & {
|
|
1400
|
+
/** @deprecated prefer `xRequestId`; kept as a fallback for existing integrations */
|
|
1390
1401
|
userId?: string;
|
|
1391
1402
|
enable?: boolean;
|
|
1392
1403
|
logSignature?: {
|
|
@@ -1412,9 +1423,30 @@ type IDCardStep = {
|
|
|
1412
1423
|
enableConfirmPopup?: boolean;
|
|
1413
1424
|
};
|
|
1414
1425
|
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';
|
|
1426
|
+
type UploadType = {
|
|
1427
|
+
/** Unique, host-defined id. Returned on results as `uploadTypeId`. */
|
|
1428
|
+
id: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* Menu row label, localized by the host. Shown only when there are 2+ entries;
|
|
1431
|
+
* when missing or empty, `id` is shown instead.
|
|
1432
|
+
*/
|
|
1433
|
+
title: string;
|
|
1434
|
+
/**
|
|
1435
|
+
* false = the flow ends after this upload: the result has `isLastStep: true`, the remaining
|
|
1436
|
+
* steps are skipped, and the host closes the SDK (destroyView) in onStepDone.
|
|
1437
|
+
*/
|
|
1438
|
+
hasBackSide: boolean;
|
|
1439
|
+
};
|
|
1415
1440
|
type UploadFromDeviceConfig = {
|
|
1416
1441
|
enable: boolean;
|
|
1417
1442
|
enableConfirmPopup?: boolean;
|
|
1443
|
+
/**
|
|
1444
|
+
* Upload types offered by the upload button. Omitted or `[]` = one generic upload per side (as before).
|
|
1445
|
+
* 1 entry: the file picker opens directly. 2+ entries: a menu opens first.
|
|
1446
|
+
* Back side: the picker opens directly; the button shows only if an entry has `hasBackSide: true`.
|
|
1447
|
+
* A list with no valid entry hides the button. Invalid entries are dropped with a console.warn.
|
|
1448
|
+
*/
|
|
1449
|
+
uploadTypes?: UploadType[];
|
|
1418
1450
|
};
|
|
1419
1451
|
type ReadIDCardOptions = {
|
|
1420
1452
|
clientSettings: Record<string, any>;
|
|
@@ -1433,6 +1465,13 @@ type ReadIDCardOptions = {
|
|
|
1433
1465
|
customErrors?: CustomErrors;
|
|
1434
1466
|
customTheme?: Record<string, any>;
|
|
1435
1467
|
uploadFromDevice?: UploadFromDeviceConfig;
|
|
1468
|
+
/**
|
|
1469
|
+
* Show the "how to scan" QR instruction popup before QR scanning starts.
|
|
1470
|
+
* Default `true`. Only an explicit `false` hides it; QR scanning then starts immediately.
|
|
1471
|
+
* Applies to the QR step inside ID capture and the standalone QR step.
|
|
1472
|
+
* The invalid-QR popup (Retry / Skip) is not affected.
|
|
1473
|
+
*/
|
|
1474
|
+
enableQrScanGuideline?: boolean;
|
|
1436
1475
|
};
|
|
1437
1476
|
type ReadIDCardWithApiCallOptions = Omit<ReadIDCardOptions, 'clientSettings'> & {
|
|
1438
1477
|
apiCredentials: APICredentials;
|
|
@@ -1566,6 +1605,17 @@ type FaceAuthenticationOptions = (BaseFaceAuthenticationOptions & {
|
|
|
1566
1605
|
apiCheck?: false;
|
|
1567
1606
|
clientSettings: Record<string, any>;
|
|
1568
1607
|
});
|
|
1608
|
+
type CompareFacesOptions = {
|
|
1609
|
+
accessKey: string;
|
|
1610
|
+
secretKey: string;
|
|
1611
|
+
apiUrl: string;
|
|
1612
|
+
image1: string;
|
|
1613
|
+
image2: string;
|
|
1614
|
+
xRequestId?: string;
|
|
1615
|
+
xRequestId2?: string;
|
|
1616
|
+
onSuccess: (result: any) => void;
|
|
1617
|
+
onError: (error: any) => void;
|
|
1618
|
+
};
|
|
1569
1619
|
|
|
1570
1620
|
declare class BaseTVWebSDK {
|
|
1571
1621
|
#private;
|
|
@@ -1600,11 +1650,11 @@ declare class BaseTVWebSDK {
|
|
|
1600
1650
|
* @private
|
|
1601
1651
|
*/
|
|
1602
1652
|
setupBeforeRender: () => void;
|
|
1603
|
-
readIDCardWithApiCall(
|
|
1604
|
-
readIDCardUIOnly(
|
|
1605
|
-
livenessDetection(
|
|
1606
|
-
faceAuthentication(
|
|
1607
|
-
compareFaces({ accessKey, secretKey, apiUrl, image1, image2, onSuccess, onError }:
|
|
1653
|
+
readIDCardWithApiCall(options: ReadIDCardWithApiCallOptions): Promise<void>;
|
|
1654
|
+
readIDCardUIOnly(options: ReadIDCardOptions): Promise<void>;
|
|
1655
|
+
livenessDetection(options: LivenessDetectionOptions): Promise<void>;
|
|
1656
|
+
faceAuthentication(options: FaceAuthenticationOptions): Promise<void>;
|
|
1657
|
+
compareFaces({ accessKey, secretKey, apiUrl, image1, image2, xRequestId, xRequestId2, onSuccess, onError, }: CompareFacesOptions): void;
|
|
1608
1658
|
destroyView: () => void;
|
|
1609
1659
|
closeSDK: () => void;
|
|
1610
1660
|
}
|
|
@@ -1670,102 +1720,84 @@ declare const defaultSteps: ({
|
|
|
1670
1720
|
enableConfirmPopup: boolean;
|
|
1671
1721
|
})[];
|
|
1672
1722
|
|
|
1673
|
-
declare
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
export { enable_7 as enable };
|
|
1752
|
-
export let threshold: number;
|
|
1753
|
-
}
|
|
1754
|
-
namespace glare_check_generic {
|
|
1755
|
-
let enable_8: boolean;
|
|
1756
|
-
export { enable_8 as enable };
|
|
1757
|
-
let threshold_1: number;
|
|
1758
|
-
export { threshold_1 as threshold };
|
|
1759
|
-
}
|
|
1760
|
-
let disable_capture_button_if_alert: boolean;
|
|
1761
|
-
namespace exif_data_settings {
|
|
1762
|
-
let enable_9: boolean;
|
|
1763
|
-
export { enable_9 as enable };
|
|
1764
|
-
}
|
|
1765
|
-
namespace id_detection {
|
|
1766
|
-
let enable_10: boolean;
|
|
1767
|
-
export { enable_10 as enable };
|
|
1768
|
-
export let card_type_model_mapping: {
|
|
1723
|
+
declare const defaultClientSettings: {
|
|
1724
|
+
data: {
|
|
1725
|
+
country: string;
|
|
1726
|
+
settings: {
|
|
1727
|
+
sdk_settings: {
|
|
1728
|
+
id_detection_settings: {
|
|
1729
|
+
show_hold_still_progress: boolean;
|
|
1730
|
+
show_auto_capture_toggle: boolean;
|
|
1731
|
+
auto_capture: {
|
|
1732
|
+
enable: boolean;
|
|
1733
|
+
show_capture_button: boolean;
|
|
1734
|
+
wait_for_best_image_time_ms: number;
|
|
1735
|
+
};
|
|
1736
|
+
manual_capture: {
|
|
1737
|
+
wait_for_best_image_time_ms: number;
|
|
1738
|
+
};
|
|
1739
|
+
card_type_check: {
|
|
1740
|
+
enable: boolean;
|
|
1741
|
+
};
|
|
1742
|
+
track_card_coordinates: {
|
|
1743
|
+
enable: boolean;
|
|
1744
|
+
max_length: number;
|
|
1745
|
+
};
|
|
1746
|
+
blur_check: {
|
|
1747
|
+
enable: boolean;
|
|
1748
|
+
large_blurry_threshold_auto: number;
|
|
1749
|
+
large_blurry_threshold_manual: number;
|
|
1750
|
+
small_blurry_threshold_auto: number;
|
|
1751
|
+
small_blurry_threshold_manual: number;
|
|
1752
|
+
large_blurry_decimal: number;
|
|
1753
|
+
small_blurry_decimal: number;
|
|
1754
|
+
};
|
|
1755
|
+
blur_check_generic: {
|
|
1756
|
+
enable: boolean;
|
|
1757
|
+
large_blurry_threshold_auto: number;
|
|
1758
|
+
large_blurry_threshold_manual: number;
|
|
1759
|
+
small_blurry_threshold_auto: number;
|
|
1760
|
+
small_blurry_threshold_manual: number;
|
|
1761
|
+
large_blurry_decimal: number;
|
|
1762
|
+
small_blurry_decimal: number;
|
|
1763
|
+
full_face_image_ratio: {
|
|
1764
|
+
top: number;
|
|
1765
|
+
right: number;
|
|
1766
|
+
left: number;
|
|
1767
|
+
bottom: number;
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
face_check_generic: {
|
|
1771
|
+
front_side: {
|
|
1772
|
+
enable: boolean;
|
|
1773
|
+
};
|
|
1774
|
+
back_side: {
|
|
1775
|
+
enable: boolean;
|
|
1776
|
+
};
|
|
1777
|
+
};
|
|
1778
|
+
flashlight_settings: {
|
|
1779
|
+
activation_delay_ms_back: number;
|
|
1780
|
+
activation_delay_ms_front: number;
|
|
1781
|
+
duration_ms_back: number;
|
|
1782
|
+
duration_ms_front: number;
|
|
1783
|
+
enable_back: boolean;
|
|
1784
|
+
enable_front: boolean;
|
|
1785
|
+
};
|
|
1786
|
+
glare_check: {
|
|
1787
|
+
enable: boolean;
|
|
1788
|
+
threshold: number;
|
|
1789
|
+
};
|
|
1790
|
+
glare_check_generic: {
|
|
1791
|
+
enable: boolean;
|
|
1792
|
+
threshold: number;
|
|
1793
|
+
};
|
|
1794
|
+
disable_capture_button_if_alert: boolean;
|
|
1795
|
+
exif_data_settings: {
|
|
1796
|
+
enable: boolean;
|
|
1797
|
+
};
|
|
1798
|
+
id_detection: {
|
|
1799
|
+
enable: boolean;
|
|
1800
|
+
card_type_model_mapping: {
|
|
1769
1801
|
'vn.national_id': {
|
|
1770
1802
|
model: string;
|
|
1771
1803
|
force_off_detection: boolean;
|
|
@@ -1791,65 +1823,59 @@ declare namespace defaultClientSettings {
|
|
|
1791
1823
|
force_off_detection: boolean;
|
|
1792
1824
|
};
|
|
1793
1825
|
};
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
}
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
}
|
|
1826
|
+
};
|
|
1827
|
+
limit_time_settings: {
|
|
1828
|
+
enable: boolean;
|
|
1829
|
+
limit_time_second: number;
|
|
1830
|
+
video_partial_length_seconds: number;
|
|
1831
|
+
max_retry_count: number;
|
|
1832
|
+
non_stoppable: boolean;
|
|
1833
|
+
};
|
|
1834
|
+
record_video: {
|
|
1835
|
+
enable_record_full_session_front: boolean;
|
|
1836
|
+
enable_record_full_session_back: boolean;
|
|
1837
|
+
enable_record_from_capture_bestframe_front: boolean;
|
|
1838
|
+
enable_record_from_capture_bestframe_back: boolean;
|
|
1839
|
+
video_frame_size_width: null;
|
|
1840
|
+
video_frame_size_height: null;
|
|
1841
|
+
bitrate: number;
|
|
1842
|
+
fps: number;
|
|
1843
|
+
};
|
|
1844
|
+
save_frame_settings: {
|
|
1845
|
+
enable: boolean;
|
|
1846
|
+
frames_interval_ms: number;
|
|
1847
|
+
quality: number;
|
|
1848
|
+
};
|
|
1849
|
+
scan_qr_settings: {
|
|
1850
|
+
enable: boolean;
|
|
1851
|
+
enable_validation: boolean;
|
|
1852
|
+
enable_scan_background: boolean;
|
|
1853
|
+
limit_time_second: number;
|
|
1854
|
+
non_stoppable: boolean;
|
|
1855
|
+
max_retry_count: number;
|
|
1856
|
+
scan_via_image: null;
|
|
1857
|
+
scan_via_step: null;
|
|
1858
|
+
};
|
|
1859
|
+
virtual_cam_hashes: {
|
|
1860
|
+
web: boolean;
|
|
1861
|
+
mobile: boolean;
|
|
1862
|
+
};
|
|
1863
|
+
image_settings: {
|
|
1864
|
+
ideal_width: null;
|
|
1865
|
+
ideal_height: null;
|
|
1866
|
+
ideal_width_mobile_web: null;
|
|
1867
|
+
ideal_height_mobile_web: null;
|
|
1868
|
+
image_quality: number;
|
|
1869
|
+
};
|
|
1870
|
+
};
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1873
|
+
};
|
|
1874
|
+
};
|
|
1849
1875
|
|
|
1850
1876
|
declare class TVWebSDK extends BaseTVWebSDK {
|
|
1851
1877
|
constructor(props: BaseTVWebSDKProps);
|
|
1852
1878
|
}
|
|
1853
1879
|
|
|
1854
1880
|
export { index$1 as Constants, TVWebSDK as SDK, SDKAdapter, ScannerType, defaultClientSettings, defaultSteps as defaultReadIDCardSteps, getSDKVersion };
|
|
1855
|
-
export type { BaseTVWebSDKProps, FaceAuthenticationOptions, FaceAuthenticationResult, IDCardStep, LivenessDetectionDoneResult, LivenessDetectionOptions, ReadIDCardOptions, ReadIDCardResult, ReadIDCardWithApiCallOptions, VideoFrame };
|
|
1881
|
+
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-types",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.40.0",
|
|
4
4
|
"description": "TypeScript definitions for the TV Web SDK standalone (UMD/CDN) bundle — types window.TVWebSDK",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Toan Trieu <toan.trieu@trustingsocial.com>",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tsocial/tvweb-sdk": "5.
|
|
25
|
+
"@tsocial/tvweb-sdk": "5.40.0",
|
|
26
26
|
"typescript": "^5.3.3"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "94dc2bbbeca9a2577840da334ed0c84308b2f71d"
|
|
29
29
|
}
|