@ray-js/api 1.7.83 → 1.7.84
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/@types/AIStreamKit.d.ts +530 -10
- package/@types/BaseKit.d.ts +291 -233
- package/@types/BizKit.d.ts +499 -161
- package/@types/LightKit.d.ts +3 -3
- package/@types/MapKit.d.ts +24 -24
- package/@types/MiniKit.d.ts +117 -92
- package/@types/OutdoorKit.d.ts +61 -61
- package/@types/P2PKit.d.ts +25 -25
- package/@types/WearKit.d.ts +550 -26
- package/lib/nativeRouters/device.d.ts +50 -15
- package/lib/nativeRouters/device.js +47 -15
- package/lib/nativeRouters/gw.d.ts +0 -3
- package/lib/nativeRouters/gw.js +0 -3
- package/lib/nativeRouters/outdoors.d.ts +12 -3
- package/lib/nativeRouters/outdoors.js +11 -3
- package/lib/nativeRouters/root.d.ts +33 -5
- package/lib/nativeRouters/root.js +32 -5
- package/package.json +5 -5
package/@types/BizKit.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* BizKit
|
|
3
3
|
*
|
|
4
|
-
* @version 4.33.
|
|
4
|
+
* @version 4.33.7
|
|
5
5
|
*/
|
|
6
6
|
declare namespace ty {
|
|
7
7
|
/**
|
|
8
8
|
* 获取历史消息
|
|
9
9
|
* @public
|
|
10
10
|
* @since BizKit 3.6.0
|
|
11
|
-
* @example
|
|
11
|
+
* @example
|
|
12
12
|
* ```tsx
|
|
13
13
|
* ty.getAIAssistantHistory({
|
|
14
14
|
* size: 1,
|
|
@@ -87,7 +87,7 @@ declare namespace ty {
|
|
|
87
87
|
* 获取AI助手组历史消息
|
|
88
88
|
* @public
|
|
89
89
|
* @since BizKit 4.9.6
|
|
90
|
-
* @example
|
|
90
|
+
* @example
|
|
91
91
|
* ```tsx
|
|
92
92
|
* ty.getAIAssistantGroupHistory({
|
|
93
93
|
* size: 1,
|
|
@@ -160,7 +160,7 @@ declare namespace ty {
|
|
|
160
160
|
* 删除消息
|
|
161
161
|
* @public
|
|
162
162
|
* @since BizKit 3.6.0
|
|
163
|
-
* @example
|
|
163
|
+
* @example
|
|
164
164
|
* ```tsx
|
|
165
165
|
* ty.deleteAIAssistant({
|
|
166
166
|
* primaryId: 1,
|
|
@@ -204,7 +204,7 @@ declare namespace ty {
|
|
|
204
204
|
* 发送消息
|
|
205
205
|
* @public
|
|
206
206
|
* @since BizKit 3.6.0
|
|
207
|
-
* @example
|
|
207
|
+
* @example
|
|
208
208
|
* ```tsx
|
|
209
209
|
* ty.sendAIAssistant({
|
|
210
210
|
* block: "xx",
|
|
@@ -294,7 +294,7 @@ declare namespace ty {
|
|
|
294
294
|
* 中断某一次对话/中断后监听onAIAssistantChange接受到一条type=TEXT_INTERRUPTED,code=5003消息/同时getAIAssistantGroupHistory接口返回一条type/code同样格式的消息
|
|
295
295
|
* @public
|
|
296
296
|
* @since BizKit 4.15.0
|
|
297
|
-
* @example
|
|
297
|
+
* @example
|
|
298
298
|
* ```tsx
|
|
299
299
|
* ty.terminateAIAssistant({
|
|
300
300
|
* requestId: "xx",
|
|
@@ -338,7 +338,7 @@ declare namespace ty {
|
|
|
338
338
|
* 数据初始
|
|
339
339
|
* @public
|
|
340
340
|
* @since BizKit 3.6.0
|
|
341
|
-
* @example
|
|
341
|
+
* @example
|
|
342
342
|
* ```tsx
|
|
343
343
|
* ty.createAIAssistant({
|
|
344
344
|
* success: data => {
|
|
@@ -376,7 +376,7 @@ declare namespace ty {
|
|
|
376
376
|
* 移除消息监听
|
|
377
377
|
* @public
|
|
378
378
|
* @since BizKit 3.6.0
|
|
379
|
-
* @example
|
|
379
|
+
* @example
|
|
380
380
|
* ```tsx
|
|
381
381
|
* ty.getAIAssistantRequestId({
|
|
382
382
|
* success: data => {
|
|
@@ -420,7 +420,7 @@ declare namespace ty {
|
|
|
420
420
|
* 移除消息监听
|
|
421
421
|
* @public
|
|
422
422
|
* @since BizKit 4.15.0
|
|
423
|
-
* @example
|
|
423
|
+
* @example
|
|
424
424
|
* ```tsx
|
|
425
425
|
* ty.getAIAssistantRequestId({
|
|
426
426
|
* success: data => {
|
|
@@ -445,7 +445,7 @@ declare namespace ty {
|
|
|
445
445
|
* 插入数据
|
|
446
446
|
* @public
|
|
447
447
|
* @since BizKit 3.6.0
|
|
448
|
-
* @example
|
|
448
|
+
* @example
|
|
449
449
|
* ```tsx
|
|
450
450
|
* ty.insertAIAssistantInfo({
|
|
451
451
|
* requestId: "xx",
|
|
@@ -548,7 +548,7 @@ declare namespace ty {
|
|
|
548
548
|
* 更新数据
|
|
549
549
|
* @public
|
|
550
550
|
* @since BizKit 3.6.0
|
|
551
|
-
* @example
|
|
551
|
+
* @example
|
|
552
552
|
* ```tsx
|
|
553
553
|
* ty.updateAIAssistantInfo({
|
|
554
554
|
* primaryId: 1,
|
|
@@ -640,7 +640,7 @@ declare namespace ty {
|
|
|
640
640
|
* 获取语音助手展示类型
|
|
641
641
|
* @public
|
|
642
642
|
* @since BizKit 3.6.0
|
|
643
|
-
* @example
|
|
643
|
+
* @example
|
|
644
644
|
* ```tsx
|
|
645
645
|
* ty.getSpeechDisplayType({
|
|
646
646
|
* success: data => {
|
|
@@ -684,7 +684,7 @@ declare namespace ty {
|
|
|
684
684
|
* 关闭AI助手
|
|
685
685
|
* @public
|
|
686
686
|
* @since BizKit 3.6.0
|
|
687
|
-
* @example
|
|
687
|
+
* @example
|
|
688
688
|
* ```tsx
|
|
689
689
|
* ty.disableAIAssistant({
|
|
690
690
|
* success: data => {
|
|
@@ -722,7 +722,7 @@ declare namespace ty {
|
|
|
722
722
|
* 打开AI助手
|
|
723
723
|
* @public
|
|
724
724
|
* @since BizKit 3.6.0
|
|
725
|
-
* @example
|
|
725
|
+
* @example
|
|
726
726
|
* ```tsx
|
|
727
727
|
* ty.enableAIAssistant({
|
|
728
728
|
* success: data => {
|
|
@@ -760,7 +760,7 @@ declare namespace ty {
|
|
|
760
760
|
* 清除数据
|
|
761
761
|
* @public
|
|
762
762
|
* @since BizKit 3.6.0
|
|
763
|
-
* @example
|
|
763
|
+
* @example
|
|
764
764
|
* ```tsx
|
|
765
765
|
* ty.deleteAIAssistantDbSource({
|
|
766
766
|
* homeId: "xx",
|
|
@@ -804,7 +804,7 @@ declare namespace ty {
|
|
|
804
804
|
* 获取单条数据
|
|
805
805
|
* @public
|
|
806
806
|
* @since BizKit 3.6.0
|
|
807
|
-
* @example
|
|
807
|
+
* @example
|
|
808
808
|
* ```tsx
|
|
809
809
|
* ty.getSingleAIAssistant({
|
|
810
810
|
* primaryId: 1,
|
|
@@ -884,7 +884,7 @@ declare namespace ty {
|
|
|
884
884
|
* 是否支持老语音助手
|
|
885
885
|
* @public
|
|
886
886
|
* @since BizKit 3.7.0
|
|
887
|
-
* @example
|
|
887
|
+
* @example
|
|
888
888
|
* ```tsx
|
|
889
889
|
* ty.isSupportOldSpeech({
|
|
890
890
|
* success: data => {
|
|
@@ -922,8 +922,8 @@ declare namespace ty {
|
|
|
922
922
|
* 打开输入框(iOS / Android 两端通用)
|
|
923
923
|
* 入参与小程序灵感广场发送给 native 的通知 payload 保持一致:udid 顶层透传用于匹配目标页面,bubbleJson 透传气泡协议字段
|
|
924
924
|
* @public
|
|
925
|
-
* @since BizKit
|
|
926
|
-
* @example
|
|
925
|
+
* @since BizKit 4.33.7
|
|
926
|
+
* @example
|
|
927
927
|
* ```tsx
|
|
928
928
|
* ty.openInputBar({
|
|
929
929
|
* udid: "test-page-udid",
|
|
@@ -960,12 +960,12 @@ declare namespace ty {
|
|
|
960
960
|
export function openInputBar(params: {
|
|
961
961
|
/**
|
|
962
962
|
* 目标页面唯一标识,App 端按 udid 匹配目标页面
|
|
963
|
-
* @since BizKit
|
|
963
|
+
* @since BizKit 4.33.7
|
|
964
964
|
*/
|
|
965
965
|
udid: string
|
|
966
966
|
/**
|
|
967
967
|
* 气泡协议字段
|
|
968
|
-
* @since BizKit
|
|
968
|
+
* @since BizKit 4.33.7
|
|
969
969
|
*/
|
|
970
970
|
bubbleJson: OpenInputBarBubbleJson
|
|
971
971
|
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
@@ -992,7 +992,7 @@ declare namespace ty {
|
|
|
992
992
|
* atop接口
|
|
993
993
|
* @public
|
|
994
994
|
* @since BizKit 3.0.0
|
|
995
|
-
* @example
|
|
995
|
+
* @example
|
|
996
996
|
* ```tsx
|
|
997
997
|
* ty.apiRequestByAtop({
|
|
998
998
|
* api: "m.life.app.ai.config",
|
|
@@ -1077,7 +1077,7 @@ declare namespace ty {
|
|
|
1077
1077
|
* highway面板接口
|
|
1078
1078
|
* @public
|
|
1079
1079
|
* @since BizKit 3.4.0
|
|
1080
|
-
* @example
|
|
1080
|
+
* @example
|
|
1081
1081
|
* ```tsx
|
|
1082
1082
|
* ty.apiRequestByHighwayRestful({
|
|
1083
1083
|
* api: "highway.api.example",
|
|
@@ -1172,7 +1172,7 @@ declare namespace ty {
|
|
|
1172
1172
|
* 单次点 事件埋点
|
|
1173
1173
|
* @public
|
|
1174
1174
|
* @since BizKit 3.0.0
|
|
1175
|
-
* @example
|
|
1175
|
+
* @example
|
|
1176
1176
|
* ```tsx
|
|
1177
1177
|
* ty.event({
|
|
1178
1178
|
* eventId: "ttt_demo_event",
|
|
@@ -1223,7 +1223,7 @@ declare namespace ty {
|
|
|
1223
1223
|
* 开始一个(时长类)事件
|
|
1224
1224
|
* @public
|
|
1225
1225
|
* @since BizKit 3.0.0
|
|
1226
|
-
* @example
|
|
1226
|
+
* @example
|
|
1227
1227
|
* ```tsx
|
|
1228
1228
|
* ty.beginEvent({
|
|
1229
1229
|
* eventName: "ttt_demo_track",
|
|
@@ -1286,7 +1286,7 @@ declare namespace ty {
|
|
|
1286
1286
|
* 发送一个(时长类)事件
|
|
1287
1287
|
* @public
|
|
1288
1288
|
* @since BizKit 3.0.0
|
|
1289
|
-
* @example
|
|
1289
|
+
* @example
|
|
1290
1290
|
* ```tsx
|
|
1291
1291
|
* ty.trackEvent({
|
|
1292
1292
|
* eventName: "ttt_demo_track",
|
|
@@ -1349,7 +1349,7 @@ declare namespace ty {
|
|
|
1349
1349
|
* 结束一个(时长类)事件
|
|
1350
1350
|
* @public
|
|
1351
1351
|
* @since BizKit 3.0.0
|
|
1352
|
-
* @example
|
|
1352
|
+
* @example
|
|
1353
1353
|
* ```tsx
|
|
1354
1354
|
* ty.endEvent({
|
|
1355
1355
|
* eventName: "ttt_demo_track",
|
|
@@ -1412,7 +1412,7 @@ declare namespace ty {
|
|
|
1412
1412
|
* 主要可以用于一个执行过程中的各个关键点的埋点
|
|
1413
1413
|
* @public
|
|
1414
1414
|
* @since BizKit 3.8.5
|
|
1415
|
-
* @example
|
|
1415
|
+
* @example
|
|
1416
1416
|
* ```tsx
|
|
1417
1417
|
* ty.eventLink({
|
|
1418
1418
|
* linkIndex: 0,
|
|
@@ -1468,7 +1468,7 @@ declare namespace ty {
|
|
|
1468
1468
|
* 业务侧定义的性能数据,会显示在性能工具中
|
|
1469
1469
|
* @public
|
|
1470
1470
|
* @since BizKit 4.12.2
|
|
1471
|
-
* @example
|
|
1471
|
+
* @example
|
|
1472
1472
|
* ```tsx
|
|
1473
1473
|
* ty.performanceEvent({
|
|
1474
1474
|
* launchData: "map_render_time",
|
|
@@ -1519,6 +1519,23 @@ declare namespace ty {
|
|
|
1519
1519
|
* 自定义事件上报能力,频率限制每个eventId 1分钟内最多 100 次上报
|
|
1520
1520
|
* @public
|
|
1521
1521
|
* @since BizKit 4.32.1
|
|
1522
|
+
* @example
|
|
1523
|
+
* ```tsx
|
|
1524
|
+
* ty.reportEvent({
|
|
1525
|
+
* eventId: "report_event_demo_execute",
|
|
1526
|
+
* event: {
|
|
1527
|
+
* action: "invoke_report_event",
|
|
1528
|
+
* source: "api_demo",
|
|
1529
|
+
* scenario: "real_device_validation",
|
|
1530
|
+
* },
|
|
1531
|
+
* success: data => {
|
|
1532
|
+
* console.log(data);
|
|
1533
|
+
* },
|
|
1534
|
+
* fail: error => {
|
|
1535
|
+
* console.error(error);
|
|
1536
|
+
* },
|
|
1537
|
+
* });
|
|
1538
|
+
* ```
|
|
1522
1539
|
* @platform iOS Android
|
|
1523
1540
|
*/
|
|
1524
1541
|
export function reportEvent(params: {
|
|
@@ -1556,7 +1573,7 @@ declare namespace ty {
|
|
|
1556
1573
|
* 拿到当前App的业务信息
|
|
1557
1574
|
* @public
|
|
1558
1575
|
* @since BizKit 3.0.0
|
|
1559
|
-
* @example
|
|
1576
|
+
* @example
|
|
1560
1577
|
* ```tsx
|
|
1561
1578
|
* ty.getAppInfo({
|
|
1562
1579
|
* success: data => {
|
|
@@ -1666,7 +1683,7 @@ declare namespace ty {
|
|
|
1666
1683
|
* 拿到当前连接的wifi的ssid
|
|
1667
1684
|
* @public
|
|
1668
1685
|
* @since BizKit 3.0.0
|
|
1669
|
-
* @example
|
|
1686
|
+
* @example
|
|
1670
1687
|
* ```tsx
|
|
1671
1688
|
* ty.getCurrentWifiSSID({
|
|
1672
1689
|
* success: data => {
|
|
@@ -1711,7 +1728,7 @@ declare namespace ty {
|
|
|
1711
1728
|
* 获取NG配置
|
|
1712
1729
|
* @public
|
|
1713
1730
|
* @since BizKit 3.5.0
|
|
1714
|
-
* @example
|
|
1731
|
+
* @example
|
|
1715
1732
|
* ```tsx
|
|
1716
1733
|
* ty.getNGConfigByKeys({
|
|
1717
1734
|
* keys: ["is_scene_support", "is_support_home_manager"],
|
|
@@ -1761,7 +1778,7 @@ declare namespace ty {
|
|
|
1761
1778
|
* 获取配置中心的配置
|
|
1762
1779
|
* @public
|
|
1763
1780
|
* @since BizKit 3.5.0
|
|
1764
|
-
* @example
|
|
1781
|
+
* @example
|
|
1765
1782
|
* ```tsx
|
|
1766
1783
|
* ty.getConfigByKeys({
|
|
1767
1784
|
* keys: [
|
|
@@ -1819,7 +1836,7 @@ declare namespace ty {
|
|
|
1819
1836
|
* 获取三方服务信息
|
|
1820
1837
|
* @public
|
|
1821
1838
|
* @since BizKit 4.3.0
|
|
1822
|
-
* @example
|
|
1839
|
+
* @example
|
|
1823
1840
|
* ```tsx
|
|
1824
1841
|
* ty.getThirdPartyServiceInfo({
|
|
1825
1842
|
* types: [2],
|
|
@@ -1863,7 +1880,7 @@ declare namespace ty {
|
|
|
1863
1880
|
* 打开三方小程序(仅iOS)
|
|
1864
1881
|
* @public
|
|
1865
1882
|
* @since BizKit 4.3.0
|
|
1866
|
-
* @example
|
|
1883
|
+
* @example
|
|
1867
1884
|
* ```tsx
|
|
1868
1885
|
* ty.openThirdPartyMiniProgram({
|
|
1869
1886
|
* type: 2,
|
|
@@ -1924,7 +1941,7 @@ declare namespace ty {
|
|
|
1924
1941
|
* 获取云端环境
|
|
1925
1942
|
* @public
|
|
1926
1943
|
* @since BizKit 4.6.0
|
|
1927
|
-
* @example
|
|
1944
|
+
* @example
|
|
1928
1945
|
* ```tsx
|
|
1929
1946
|
* ty.getCloudEnv({
|
|
1930
1947
|
* success: data => {
|
|
@@ -1971,7 +1988,7 @@ declare namespace ty {
|
|
|
1971
1988
|
* 当前环境是否支持小程序
|
|
1972
1989
|
* @public
|
|
1973
1990
|
* @since BizKit 4.7.2
|
|
1974
|
-
* @example
|
|
1991
|
+
* @example
|
|
1975
1992
|
* ```tsx
|
|
1976
1993
|
* ty.isMiniAppAvailable({
|
|
1977
1994
|
* success: data => {
|
|
@@ -2015,7 +2032,7 @@ declare namespace ty {
|
|
|
2015
2032
|
* 获取当前App的tab信息(仅Android)
|
|
2016
2033
|
* @public
|
|
2017
2034
|
* @since BizKit 4.10.0
|
|
2018
|
-
* @example
|
|
2035
|
+
* @example
|
|
2019
2036
|
* ```tsx
|
|
2020
2037
|
* ty.getAppTabInfo({
|
|
2021
2038
|
* success: data => {
|
|
@@ -2059,7 +2076,7 @@ declare namespace ty {
|
|
|
2059
2076
|
* 获取当前App的隐私政策(仅Android)
|
|
2060
2077
|
* @public
|
|
2061
2078
|
* @since BizKit 4.16.8
|
|
2062
|
-
* @example
|
|
2079
|
+
* @example
|
|
2063
2080
|
* ```tsx
|
|
2064
2081
|
* ty.getAppPrivacyPolicyInfo({
|
|
2065
2082
|
* success: data => {
|
|
@@ -2168,7 +2185,7 @@ declare namespace ty {
|
|
|
2168
2185
|
* 进入选择国家页面
|
|
2169
2186
|
* @public
|
|
2170
2187
|
* @since BizKit 3.0.0
|
|
2171
|
-
* @example
|
|
2188
|
+
* @example
|
|
2172
2189
|
* ```tsx
|
|
2173
2190
|
* ty.openCountrySelectPage({
|
|
2174
2191
|
* success: data => {
|
|
@@ -2206,6 +2223,23 @@ declare namespace ty {
|
|
|
2206
2223
|
* 广告预加载和权限处理
|
|
2207
2224
|
* @public
|
|
2208
2225
|
* @since BizKit 4.29.0
|
|
2226
|
+
* @example
|
|
2227
|
+
* ```tsx
|
|
2228
|
+
* ty.preloadAd({
|
|
2229
|
+
* bizCode: "ttt_admob_demo",
|
|
2230
|
+
* posCodes: ["pos_faremini", "pos_rewardedAd", "pos_interstitialAd"],
|
|
2231
|
+
* userInfo: {
|
|
2232
|
+
* source: "api_demo",
|
|
2233
|
+
* },
|
|
2234
|
+
* backgroundColor: "#F1D2F9",
|
|
2235
|
+
* success: data => {
|
|
2236
|
+
* console.log(data);
|
|
2237
|
+
* },
|
|
2238
|
+
* fail: error => {
|
|
2239
|
+
* console.error(error);
|
|
2240
|
+
* },
|
|
2241
|
+
* });
|
|
2242
|
+
* ```
|
|
2209
2243
|
* @platform iOS Android
|
|
2210
2244
|
*/
|
|
2211
2245
|
export function preloadAd(params: {
|
|
@@ -2259,6 +2293,24 @@ declare namespace ty {
|
|
|
2259
2293
|
* 播放激励视频广告
|
|
2260
2294
|
* @public
|
|
2261
2295
|
* @since BizKit 4.29.0
|
|
2296
|
+
* @example
|
|
2297
|
+
* ```tsx
|
|
2298
|
+
* ty.showRewardedAd({
|
|
2299
|
+
* bizCode: "ttt_admob_demo",
|
|
2300
|
+
* source: "task_interstitial",
|
|
2301
|
+
* userInfo: {
|
|
2302
|
+
* source: "api_demo",
|
|
2303
|
+
* },
|
|
2304
|
+
* posCode: "pos_interstitialAd",
|
|
2305
|
+
* countdownSeconds: 5,
|
|
2306
|
+
* success: data => {
|
|
2307
|
+
* console.log(data);
|
|
2308
|
+
* },
|
|
2309
|
+
* fail: error => {
|
|
2310
|
+
* console.error(error);
|
|
2311
|
+
* },
|
|
2312
|
+
* });
|
|
2313
|
+
* ```
|
|
2262
2314
|
* @platform iOS Android
|
|
2263
2315
|
*/
|
|
2264
2316
|
export function showRewardedAd(params: {
|
|
@@ -2319,6 +2371,29 @@ declare namespace ty {
|
|
|
2319
2371
|
* 不走福利中心 posCode 策略与 status/claim/complete 任务编排,仅返回是否可发奖励。
|
|
2320
2372
|
* @public
|
|
2321
2373
|
* @since BizKit 4.32.8
|
|
2374
|
+
* @example
|
|
2375
|
+
* ```tsx
|
|
2376
|
+
* const { platform } = ty.getSystemInfoSync();
|
|
2377
|
+
* const adUnitId =
|
|
2378
|
+
* platform === "ios"
|
|
2379
|
+
* ? "ca-app-pub-3940256099942544/1712485313"
|
|
2380
|
+
* : "ca-app-pub-3940256099942544/5224354917";
|
|
2381
|
+
*
|
|
2382
|
+
* ty.playRewardedAdByUnitId({
|
|
2383
|
+
* bizCode: "ttt_admob_demo",
|
|
2384
|
+
* adUnitId,
|
|
2385
|
+
* videoType: "rewarded",
|
|
2386
|
+
* userInfo: {
|
|
2387
|
+
* source: "api_demo",
|
|
2388
|
+
* },
|
|
2389
|
+
* success: data => {
|
|
2390
|
+
* console.log(data);
|
|
2391
|
+
* },
|
|
2392
|
+
* fail: error => {
|
|
2393
|
+
* console.error(error);
|
|
2394
|
+
* },
|
|
2395
|
+
* });
|
|
2396
|
+
* ```
|
|
2322
2397
|
* @platform iOS Android
|
|
2323
2398
|
*/
|
|
2324
2399
|
export function playRewardedAdByUnitId(params: {
|
|
@@ -2372,6 +2447,22 @@ declare namespace ty {
|
|
|
2372
2447
|
* 请求创建签到日历提醒
|
|
2373
2448
|
* @public
|
|
2374
2449
|
* @since BizKit 4.29.0
|
|
2450
|
+
* @example
|
|
2451
|
+
* ```tsx
|
|
2452
|
+
* ty.requestCheckInReminder({
|
|
2453
|
+
* startDate: Date.now() + 24 * 60 * 60 * 1000,
|
|
2454
|
+
* endDays: 7,
|
|
2455
|
+
* title: "广告签到提醒",
|
|
2456
|
+
* notes: "记得完成每日签到",
|
|
2457
|
+
* alarmMinutes: 15,
|
|
2458
|
+
* success: data => {
|
|
2459
|
+
* console.log(data);
|
|
2460
|
+
* },
|
|
2461
|
+
* fail: error => {
|
|
2462
|
+
* console.error(error);
|
|
2463
|
+
* },
|
|
2464
|
+
* });
|
|
2465
|
+
* ```
|
|
2375
2466
|
* @platform iOS Android
|
|
2376
2467
|
*/
|
|
2377
2468
|
export function requestCheckInReminder(params: {
|
|
@@ -2435,6 +2526,17 @@ declare namespace ty {
|
|
|
2435
2526
|
* 请求 UMP 同意信息更新,并在需要时展示同意弹窗
|
|
2436
2527
|
* @public
|
|
2437
2528
|
* @since BizKit 4.32.0
|
|
2529
|
+
* @example
|
|
2530
|
+
* ```tsx
|
|
2531
|
+
* ty.requestConsentInfoUpdateAndLoadPresentIfRequired({
|
|
2532
|
+
* success: data => {
|
|
2533
|
+
* console.log(data);
|
|
2534
|
+
* },
|
|
2535
|
+
* fail: error => {
|
|
2536
|
+
* console.error(error);
|
|
2537
|
+
* },
|
|
2538
|
+
* });
|
|
2539
|
+
* ```
|
|
2438
2540
|
* @platform iOS Android
|
|
2439
2541
|
*/
|
|
2440
2542
|
export function requestConsentInfoUpdateAndLoadPresentIfRequired(params?: {
|
|
@@ -2462,6 +2564,18 @@ declare namespace ty {
|
|
|
2462
2564
|
* 广告差评反馈结果同步(投诉小程序单向通知 Native)
|
|
2463
2565
|
* @public
|
|
2464
2566
|
* @since BizKit 4.32.11
|
|
2567
|
+
* @example
|
|
2568
|
+
* ```tsx
|
|
2569
|
+
* ty.syncAdFeedbackResult({
|
|
2570
|
+
* result: 0,
|
|
2571
|
+
* success: data => {
|
|
2572
|
+
* console.log(data);
|
|
2573
|
+
* },
|
|
2574
|
+
* fail: error => {
|
|
2575
|
+
* console.error(error);
|
|
2576
|
+
* },
|
|
2577
|
+
* });
|
|
2578
|
+
* ```
|
|
2465
2579
|
* @platform iOS Android
|
|
2466
2580
|
*/
|
|
2467
2581
|
export function syncAdFeedbackResult(params: {
|
|
@@ -2494,7 +2608,7 @@ declare namespace ty {
|
|
|
2494
2608
|
* 获取iconfont信息
|
|
2495
2609
|
* @public
|
|
2496
2610
|
* @since BizKit 3.0.0
|
|
2497
|
-
* @example
|
|
2611
|
+
* @example
|
|
2498
2612
|
* ```tsx
|
|
2499
2613
|
* ty.getIconfontInfo({
|
|
2500
2614
|
* success: data => {
|
|
@@ -2539,7 +2653,7 @@ declare namespace ty {
|
|
|
2539
2653
|
* 判断当前系统是否支持emoji
|
|
2540
2654
|
* @public
|
|
2541
2655
|
* @since BizKit 4.31.4
|
|
2542
|
-
* @example
|
|
2656
|
+
* @example
|
|
2543
2657
|
* ```tsx
|
|
2544
2658
|
* ty.checkCurrentSystemSupportEmoji({
|
|
2545
2659
|
* emoji: "xx",
|
|
@@ -2583,7 +2697,7 @@ declare namespace ty {
|
|
|
2583
2697
|
* IAP支付方法
|
|
2584
2698
|
* @public
|
|
2585
2699
|
* @since BizKit 3.9.8
|
|
2586
|
-
* @example
|
|
2700
|
+
* @example
|
|
2587
2701
|
* ```tsx
|
|
2588
2702
|
* // Real IAP flow: query product info via getProductInfos first, then pay with its productId.
|
|
2589
2703
|
* // orderID / preFlowCode must come from the server order API (e.g. /api/v2/order/book).
|
|
@@ -2708,7 +2822,7 @@ declare namespace ty {
|
|
|
2708
2822
|
* 支付类型
|
|
2709
2823
|
* @public
|
|
2710
2824
|
* @since BizKit 3.9.8
|
|
2711
|
-
* @example
|
|
2825
|
+
* @example
|
|
2712
2826
|
* ```tsx
|
|
2713
2827
|
* ty.iapType({
|
|
2714
2828
|
* success: data => {
|
|
@@ -2752,7 +2866,7 @@ declare namespace ty {
|
|
|
2752
2866
|
* 获取内购项目列表信息
|
|
2753
2867
|
* @public
|
|
2754
2868
|
* @since BizKit 4.21.0
|
|
2755
|
-
* @example
|
|
2869
|
+
* @example
|
|
2756
2870
|
* ```tsx
|
|
2757
2871
|
* ty.getProductInfos({
|
|
2758
2872
|
* productIds: ["com.tuya.demo.product"],
|
|
@@ -2808,6 +2922,35 @@ declare namespace ty {
|
|
|
2808
2922
|
* 上传图片文件
|
|
2809
2923
|
* @public
|
|
2810
2924
|
* @since BizKit 3.0.0
|
|
2925
|
+
* @example
|
|
2926
|
+
* ```tsx
|
|
2927
|
+
* // Download a real image to a local path first, then upload it.
|
|
2928
|
+
* // bizType is a cetus web_file_scene alias configured on the backend (e.g. "light-common").
|
|
2929
|
+
* ty.downloadFile({
|
|
2930
|
+
* url:
|
|
2931
|
+
* "https://images.tuyacn.com/rms-static/b7bed040-87b8-11eb-864d-a9f07cbbdf37-1616051299140.png?tyName=logo_cn.png",
|
|
2932
|
+
* success: res => {
|
|
2933
|
+
* const filePath = res.tempFilePath || res.filePath || res.apFilePath;
|
|
2934
|
+
* console.log("downloaded", filePath);
|
|
2935
|
+
* ty.uploadImage({
|
|
2936
|
+
* filePath: filePath,
|
|
2937
|
+
* bizType: "light-common",
|
|
2938
|
+
* contentType: "image/png",
|
|
2939
|
+
* delayTime: 2,
|
|
2940
|
+
* pollMaxCount: 5,
|
|
2941
|
+
* success: data => {
|
|
2942
|
+
* console.log(data);
|
|
2943
|
+
* },
|
|
2944
|
+
* fail: error => {
|
|
2945
|
+
* console.error(error);
|
|
2946
|
+
* },
|
|
2947
|
+
* });
|
|
2948
|
+
* },
|
|
2949
|
+
* fail: error => {
|
|
2950
|
+
* console.error(error);
|
|
2951
|
+
* },
|
|
2952
|
+
* });
|
|
2953
|
+
* ```
|
|
2811
2954
|
* @platform iOS
|
|
2812
2955
|
*/
|
|
2813
2956
|
export function uploadImage(params: {
|
|
@@ -2869,6 +3012,32 @@ declare namespace ty {
|
|
|
2869
3012
|
* 上传视频文件
|
|
2870
3013
|
* @public
|
|
2871
3014
|
* @since BizKit 3.8.4
|
|
3015
|
+
* @example
|
|
3016
|
+
* ```tsx
|
|
3017
|
+
* // Download a real video to a local path first, then upload it.
|
|
3018
|
+
* ty.downloadFile({
|
|
3019
|
+
* url:
|
|
3020
|
+
* "https://images.tuyacn.com/rms-static/05b751a0-3596-11ed-acd5-2f6ea556a3fd-1663315397562.mp4",
|
|
3021
|
+
* success: res => {
|
|
3022
|
+
* const filePath = res.tempFilePath || res.filePath || res.apFilePath;
|
|
3023
|
+
* console.log("downloaded", filePath);
|
|
3024
|
+
* ty.uploadVideo({
|
|
3025
|
+
* filePath: filePath,
|
|
3026
|
+
* bizType: "light-common",
|
|
3027
|
+
* contentType: "video/mp4",
|
|
3028
|
+
* success: data => {
|
|
3029
|
+
* console.log(data);
|
|
3030
|
+
* },
|
|
3031
|
+
* fail: error => {
|
|
3032
|
+
* console.error(error);
|
|
3033
|
+
* },
|
|
3034
|
+
* });
|
|
3035
|
+
* },
|
|
3036
|
+
* fail: error => {
|
|
3037
|
+
* console.error(error);
|
|
3038
|
+
* },
|
|
3039
|
+
* });
|
|
3040
|
+
* ```
|
|
2872
3041
|
* @platform iOS
|
|
2873
3042
|
*/
|
|
2874
3043
|
export function uploadVideo(params: {
|
|
@@ -2918,7 +3087,7 @@ declare namespace ty {
|
|
|
2918
3087
|
* 创建实时活动
|
|
2919
3088
|
* @public
|
|
2920
3089
|
* @since BizKit 4.8.3
|
|
2921
|
-
* @example
|
|
3090
|
+
* @example
|
|
2922
3091
|
* ```tsx
|
|
2923
3092
|
* ty.createLiveActivity({
|
|
2924
3093
|
* activityType: "Pay",
|
|
@@ -2975,7 +3144,7 @@ declare namespace ty {
|
|
|
2975
3144
|
* 小程序获取当前页面所有使用到的多语言code
|
|
2976
3145
|
* @public
|
|
2977
3146
|
* @since BizKit 4.12.6
|
|
2978
|
-
* @example
|
|
3147
|
+
* @example
|
|
2979
3148
|
* ```tsx
|
|
2980
3149
|
* ty.getDebugLangCodes({
|
|
2981
3150
|
* success: data => {
|
|
@@ -3019,7 +3188,7 @@ declare namespace ty {
|
|
|
3019
3188
|
* 存储当前页面所有使用到的多语言code, 客户端调用
|
|
3020
3189
|
* @public
|
|
3021
3190
|
* @since BizKit 4.12.6
|
|
3022
|
-
* @example
|
|
3191
|
+
* @example
|
|
3023
3192
|
* ```tsx
|
|
3024
3193
|
* ty.setDebugLangCodes({
|
|
3025
3194
|
* codes: ["common_confirm", "common_cancel"],
|
|
@@ -3063,7 +3232,7 @@ declare namespace ty {
|
|
|
3063
3232
|
* 获取手机当前地区语言 zh-hans 、en-GB
|
|
3064
3233
|
* @public
|
|
3065
3234
|
* @since BizKit 3.0.0
|
|
3066
|
-
* @example
|
|
3235
|
+
* @example
|
|
3067
3236
|
* ```tsx
|
|
3068
3237
|
* ty.getLangKey({
|
|
3069
3238
|
* success: data => {
|
|
@@ -3107,7 +3276,7 @@ declare namespace ty {
|
|
|
3107
3276
|
* 获取多语言
|
|
3108
3277
|
* @public
|
|
3109
3278
|
* @since BizKit 3.0.0
|
|
3110
|
-
* @example
|
|
3279
|
+
* @example
|
|
3111
3280
|
* ```tsx
|
|
3112
3281
|
* ty.getLangContent({
|
|
3113
3282
|
* success: data => {
|
|
@@ -3151,7 +3320,7 @@ declare namespace ty {
|
|
|
3151
3320
|
* 上报日志弹窗
|
|
3152
3321
|
* @public
|
|
3153
3322
|
* @since BizKit 4.19.0
|
|
3154
|
-
* @example
|
|
3323
|
+
* @example
|
|
3155
3324
|
* ```tsx
|
|
3156
3325
|
* ty.showLogUploadDialog({
|
|
3157
3326
|
* success: data => {
|
|
@@ -3189,7 +3358,7 @@ declare namespace ty {
|
|
|
3189
3358
|
* 注册界面刷新
|
|
3190
3359
|
* @public
|
|
3191
3360
|
* @since BizKit 4.2.0
|
|
3192
|
-
* @example
|
|
3361
|
+
* @example
|
|
3193
3362
|
* ```tsx
|
|
3194
3363
|
* ty.registerPageRefreshListener({
|
|
3195
3364
|
* success: data => {
|
|
@@ -3227,7 +3396,7 @@ declare namespace ty {
|
|
|
3227
3396
|
* 传入key值,获取对应NG元数据
|
|
3228
3397
|
* @public
|
|
3229
3398
|
* @since BizKit 4.3.1
|
|
3230
|
-
* @example
|
|
3399
|
+
* @example
|
|
3231
3400
|
* ```tsx
|
|
3232
3401
|
* ty.getNgRawData({
|
|
3233
3402
|
* rawKey: "google_maps_key",
|
|
@@ -3277,7 +3446,7 @@ declare namespace ty {
|
|
|
3277
3446
|
* 获取在线客户电子
|
|
3278
3447
|
* @public
|
|
3279
3448
|
* @since BizKit 4.5.1
|
|
3280
|
-
* @example
|
|
3449
|
+
* @example
|
|
3281
3450
|
* ```tsx
|
|
3282
3451
|
* ty.getOnlineCustomerService({
|
|
3283
3452
|
* success: data => {
|
|
@@ -3321,7 +3490,7 @@ declare namespace ty {
|
|
|
3321
3490
|
* 打开RN面板 (该方法已被废弃, 请使用openPanel替代)
|
|
3322
3491
|
* @public
|
|
3323
3492
|
* @since BizKit 3.0.0
|
|
3324
|
-
* @example
|
|
3493
|
+
* @example
|
|
3325
3494
|
* ```tsx
|
|
3326
3495
|
* ty.openRNPanel({
|
|
3327
3496
|
* deviceId: "xx",
|
|
@@ -3386,7 +3555,7 @@ declare namespace ty {
|
|
|
3386
3555
|
* 不关心是跳转RN面板还是面板小程序
|
|
3387
3556
|
* @public
|
|
3388
3557
|
* @since BizKit 3.0.0
|
|
3389
|
-
* @example
|
|
3558
|
+
* @example
|
|
3390
3559
|
* ```tsx
|
|
3391
3560
|
* ty.openPanel({
|
|
3392
3561
|
* deviceId: "xx",
|
|
@@ -3441,7 +3610,7 @@ declare namespace ty {
|
|
|
3441
3610
|
* 回到首页并打开面板
|
|
3442
3611
|
* @public
|
|
3443
3612
|
* @since BizKit 3.2.7
|
|
3444
|
-
* @example
|
|
3613
|
+
* @example
|
|
3445
3614
|
* ```tsx
|
|
3446
3615
|
* ty.backToHomeAndOpenPanel({
|
|
3447
3616
|
* deviceId: "xx",
|
|
@@ -3504,7 +3673,7 @@ declare namespace ty {
|
|
|
3504
3673
|
* 面板预下载
|
|
3505
3674
|
* @public
|
|
3506
3675
|
* @since BizKit 3.0.0
|
|
3507
|
-
* @example
|
|
3676
|
+
* @example
|
|
3508
3677
|
* ```tsx
|
|
3509
3678
|
* ty.preloadPanel({
|
|
3510
3679
|
* deviceId: "xx",
|
|
@@ -3554,7 +3723,7 @@ declare namespace ty {
|
|
|
3554
3723
|
* 打开内置H5容器
|
|
3555
3724
|
* @public
|
|
3556
3725
|
* @since BizKit 3.0.0
|
|
3557
|
-
* @example
|
|
3726
|
+
* @example
|
|
3558
3727
|
* ```tsx
|
|
3559
3728
|
* ty.openInnerH5({
|
|
3560
3729
|
* url: "xx",
|
|
@@ -3607,7 +3776,7 @@ declare namespace ty {
|
|
|
3607
3776
|
* "App-Settings-Notification" -> App应用通知设置界面 (Android 独有)
|
|
3608
3777
|
* @public
|
|
3609
3778
|
* @since BizKit 3.0.0
|
|
3610
|
-
* @example
|
|
3779
|
+
* @example
|
|
3611
3780
|
* ```tsx
|
|
3612
3781
|
* ty.openAppSystemSettingPage({
|
|
3613
3782
|
* scope: "xx",
|
|
@@ -3671,7 +3840,7 @@ declare namespace ty {
|
|
|
3671
3840
|
* "Settings-Notification" -> 手机通知设置界面
|
|
3672
3841
|
* @public
|
|
3673
3842
|
* @since BizKit 3.0.0
|
|
3674
|
-
* @example
|
|
3843
|
+
* @example
|
|
3675
3844
|
* ```tsx
|
|
3676
3845
|
* ty.openSystemSettingPage({
|
|
3677
3846
|
* scope: "xx",
|
|
@@ -3729,7 +3898,7 @@ declare namespace ty {
|
|
|
3729
3898
|
* 向已注册的事件通道发送事件,可通过onReceiveMessage接收事件
|
|
3730
3899
|
* @public
|
|
3731
3900
|
* @since BizKit 3.0.0
|
|
3732
|
-
* @example
|
|
3901
|
+
* @example
|
|
3733
3902
|
* ```tsx
|
|
3734
3903
|
* ty.emitChannel({
|
|
3735
3904
|
* eventName: "xx",
|
|
@@ -3778,7 +3947,7 @@ declare namespace ty {
|
|
|
3778
3947
|
* 设置当前 Android Activity 返回给调用方的结果
|
|
3779
3948
|
* @public
|
|
3780
3949
|
* @since BizKit 4.2.0
|
|
3781
|
-
* @example
|
|
3950
|
+
* @example
|
|
3782
3951
|
* ```tsx
|
|
3783
3952
|
* ty.setActivityResult({
|
|
3784
3953
|
* resultCode: 1,
|
|
@@ -3829,7 +3998,7 @@ declare namespace ty {
|
|
|
3829
3998
|
* 打开三方App
|
|
3830
3999
|
* @public
|
|
3831
4000
|
* @since BizKit 4.2.0
|
|
3832
|
-
* @example
|
|
4001
|
+
* @example
|
|
3833
4002
|
* ```tsx
|
|
3834
4003
|
* ty.openThirdApp({
|
|
3835
4004
|
* uriString: "xx",
|
|
@@ -3886,7 +4055,7 @@ declare namespace ty {
|
|
|
3886
4055
|
* 打开三方App
|
|
3887
4056
|
* @public
|
|
3888
4057
|
* @since BizKit 4.2.0
|
|
3889
|
-
* @example
|
|
4058
|
+
* @example
|
|
3890
4059
|
* ```tsx
|
|
3891
4060
|
* ty.openThirdApp({
|
|
3892
4061
|
* uriString: "xx",
|
|
@@ -3914,7 +4083,7 @@ declare namespace ty {
|
|
|
3914
4083
|
* 聚焦系统浏览器通过打开URL
|
|
3915
4084
|
* @public
|
|
3916
4085
|
* @since BizKit 4.2.0
|
|
3917
|
-
* @example
|
|
4086
|
+
* @example
|
|
3918
4087
|
* ```tsx
|
|
3919
4088
|
* ty.openUrlForceDefaultBrowser({
|
|
3920
4089
|
* url: "xx",
|
|
@@ -3958,6 +4127,19 @@ declare namespace ty {
|
|
|
3958
4127
|
* 控制面板是否展示智能体浮窗
|
|
3959
4128
|
* @public
|
|
3960
4129
|
* @since BizKit 4.19.4
|
|
4130
|
+
* @example
|
|
4131
|
+
* ```tsx
|
|
4132
|
+
* ty.enablePanelAgent({
|
|
4133
|
+
* enableFloat: true,
|
|
4134
|
+
* enableDrop: true,
|
|
4135
|
+
* success: data => {
|
|
4136
|
+
* console.log(data);
|
|
4137
|
+
* },
|
|
4138
|
+
* fail: error => {
|
|
4139
|
+
* console.error(error);
|
|
4140
|
+
* },
|
|
4141
|
+
* });
|
|
4142
|
+
* ```
|
|
3961
4143
|
* @platform iOS Android
|
|
3962
4144
|
*/
|
|
3963
4145
|
export function enablePanelAgent(params?: {
|
|
@@ -3997,7 +4179,7 @@ declare namespace ty {
|
|
|
3997
4179
|
* 获取支付相关常量信息
|
|
3998
4180
|
* @public
|
|
3999
4181
|
* @since BizKit 3.1.2
|
|
4000
|
-
* @example
|
|
4182
|
+
* @example
|
|
4001
4183
|
* ```tsx
|
|
4002
4184
|
* ty.getIapInfo({
|
|
4003
4185
|
* success: data => {
|
|
@@ -4050,7 +4232,7 @@ declare namespace ty {
|
|
|
4050
4232
|
* iap支付是否准备就绪
|
|
4051
4233
|
* @public
|
|
4052
4234
|
* @since BizKit 3.1.2
|
|
4053
|
-
* @example
|
|
4235
|
+
* @example
|
|
4054
4236
|
* ```tsx
|
|
4055
4237
|
* ty.iapPayReady({
|
|
4056
4238
|
* subscription: 1,
|
|
@@ -4101,7 +4283,7 @@ declare namespace ty {
|
|
|
4101
4283
|
* 发起iap应用内购买, 购买结果请通过onOrderStatusListener做相关的监听
|
|
4102
4284
|
* @public
|
|
4103
4285
|
* @since BizKit 3.1.2
|
|
4104
|
-
* @example
|
|
4286
|
+
* @example
|
|
4105
4287
|
* ```tsx
|
|
4106
4288
|
* ty.pay({
|
|
4107
4289
|
* order_id: "xx",
|
|
@@ -4181,7 +4363,7 @@ declare namespace ty {
|
|
|
4181
4363
|
* 添加订单状态监听, 后可用onOrderStatusListener收到相关事件
|
|
4182
4364
|
* @public
|
|
4183
4365
|
* @since BizKit 3.1.4
|
|
4184
|
-
* @example
|
|
4366
|
+
* @example
|
|
4185
4367
|
* ```tsx
|
|
4186
4368
|
* ty.addOrderStatusListener({
|
|
4187
4369
|
* order_id: "xx",
|
|
@@ -4225,7 +4407,7 @@ declare namespace ty {
|
|
|
4225
4407
|
* 移除订单状态监听
|
|
4226
4408
|
* @public
|
|
4227
4409
|
* @since BizKit 3.1.4
|
|
4228
|
-
* @example
|
|
4410
|
+
* @example
|
|
4229
4411
|
* ```tsx
|
|
4230
4412
|
* ty.removeOrderStatusListener({
|
|
4231
4413
|
* order_id: "xx",
|
|
@@ -4269,7 +4451,7 @@ declare namespace ty {
|
|
|
4269
4451
|
* 查询商品详情-目前仅Android可用
|
|
4270
4452
|
* @public
|
|
4271
4453
|
* @since BizKit 4.13.6
|
|
4272
|
-
* @example
|
|
4454
|
+
* @example
|
|
4273
4455
|
* ```tsx
|
|
4274
4456
|
* ty.queryProductDetails({
|
|
4275
4457
|
* productList: [
|
|
@@ -4334,7 +4516,7 @@ declare namespace ty {
|
|
|
4334
4516
|
* errorCode 10014 当前路由不存在当前APP中, 不可用
|
|
4335
4517
|
* @public
|
|
4336
4518
|
* @since BizKit 3.0.0
|
|
4337
|
-
* @example
|
|
4519
|
+
* @example
|
|
4338
4520
|
* ```tsx
|
|
4339
4521
|
* ty.router({
|
|
4340
4522
|
* url: "thingsmart://device",
|
|
@@ -4378,7 +4560,7 @@ declare namespace ty {
|
|
|
4378
4560
|
* 判断该路由host是否存在在当前APP中
|
|
4379
4561
|
* @public
|
|
4380
4562
|
* @since BizKit 3.0.0
|
|
4381
|
-
* @example
|
|
4563
|
+
* @example
|
|
4382
4564
|
* ```tsx
|
|
4383
4565
|
* ty.canIUseRouter({
|
|
4384
4566
|
* url: "thingsmart://device",
|
|
@@ -4428,7 +4610,7 @@ declare namespace ty {
|
|
|
4428
4610
|
* 跳转设备详情页面, 已废弃
|
|
4429
4611
|
* @public
|
|
4430
4612
|
* @since BizKit 3.0.0
|
|
4431
|
-
* @example
|
|
4613
|
+
* @example
|
|
4432
4614
|
* ```tsx
|
|
4433
4615
|
* ty.goDeviceDetail({
|
|
4434
4616
|
* deviceId: "vdevo173371369318062",
|
|
@@ -4478,7 +4660,7 @@ declare namespace ty {
|
|
|
4478
4660
|
* 跳转设备定时页面, 已废弃
|
|
4479
4661
|
* @public
|
|
4480
4662
|
* @since BizKit 3.0.0
|
|
4481
|
-
* @example
|
|
4663
|
+
* @example
|
|
4482
4664
|
* ```tsx
|
|
4483
4665
|
* ty.goDeviceAlarm({
|
|
4484
4666
|
* deviceId: "vdevo173371369318062",
|
|
@@ -4554,7 +4736,7 @@ declare namespace ty {
|
|
|
4554
4736
|
* 按指定分享渠道分享文本、图片、文件、网页或小程序内容
|
|
4555
4737
|
* @public
|
|
4556
4738
|
* @since BizKit 3.0.0
|
|
4557
|
-
* @example
|
|
4739
|
+
* @example
|
|
4558
4740
|
* ```tsx
|
|
4559
4741
|
* ty.share({
|
|
4560
4742
|
* type: "WeChat",
|
|
@@ -4650,7 +4832,7 @@ declare namespace ty {
|
|
|
4650
4832
|
* 获取可分享的渠道列表
|
|
4651
4833
|
* @public
|
|
4652
4834
|
* @since BizKit 3.0.0
|
|
4653
|
-
* @example
|
|
4835
|
+
* @example
|
|
4654
4836
|
* ```tsx
|
|
4655
4837
|
* ty.getShareChannelList({
|
|
4656
4838
|
* success: data => {
|
|
@@ -4694,7 +4876,7 @@ declare namespace ty {
|
|
|
4694
4876
|
* 显示分享弹窗
|
|
4695
4877
|
* @public
|
|
4696
4878
|
* @since BizKit 4.12.2
|
|
4697
|
-
* @example
|
|
4879
|
+
* @example
|
|
4698
4880
|
* ```tsx
|
|
4699
4881
|
* ty.showSharePanel({
|
|
4700
4882
|
* contentType: 1,
|
|
@@ -4749,7 +4931,7 @@ declare namespace ty {
|
|
|
4749
4931
|
* 根据分享内容参数直接发起分享
|
|
4750
4932
|
* @public
|
|
4751
4933
|
* @since BizKit 4.12.2
|
|
4752
|
-
* @example
|
|
4934
|
+
* @example
|
|
4753
4935
|
* ```tsx
|
|
4754
4936
|
* ty.shareDirectly({
|
|
4755
4937
|
* platformType: "xx",
|
|
@@ -4816,7 +4998,7 @@ declare namespace ty {
|
|
|
4816
4998
|
* 是否支持 siri, 仅 iOS
|
|
4817
4999
|
* @public
|
|
4818
5000
|
* @since BizKit 3.1.1
|
|
4819
|
-
* @example
|
|
5001
|
+
* @example
|
|
4820
5002
|
* ```tsx
|
|
4821
5003
|
* ty.isSupportedShortcut({
|
|
4822
5004
|
* success: data => {
|
|
@@ -4860,7 +5042,7 @@ declare namespace ty {
|
|
|
4860
5042
|
* 获取是否关联 siri 状态, 仅 iOS
|
|
4861
5043
|
* @public
|
|
4862
5044
|
* @since BizKit 3.1.1
|
|
4863
|
-
* @example
|
|
5045
|
+
* @example
|
|
4864
5046
|
* ```tsx
|
|
4865
5047
|
* ty.isAssociatedShortcut({
|
|
4866
5048
|
* sceneId: "xx",
|
|
@@ -4916,7 +5098,7 @@ declare namespace ty {
|
|
|
4916
5098
|
* 获取场景关联的 Siri 语音短语, 仅 iOS
|
|
4917
5099
|
* @public
|
|
4918
5100
|
* @since BizKit 4.29.6
|
|
4919
|
-
* @example
|
|
5101
|
+
* @example
|
|
4920
5102
|
* ```tsx
|
|
4921
5103
|
* ty.getSiriPhrase({
|
|
4922
5104
|
* sceneId: "xx",
|
|
@@ -4966,7 +5148,7 @@ declare namespace ty {
|
|
|
4966
5148
|
* 操作快捷方式,包括添加和移除, 仅 iOS
|
|
4967
5149
|
* @public
|
|
4968
5150
|
* @since BizKit 3.1.1
|
|
4969
|
-
* @example
|
|
5151
|
+
* @example
|
|
4970
5152
|
* ```tsx
|
|
4971
5153
|
* ty.handleShortcut({
|
|
4972
5154
|
* type: 1,
|
|
@@ -5039,7 +5221,7 @@ declare namespace ty {
|
|
|
5039
5221
|
* 获取用户信息
|
|
5040
5222
|
* @public
|
|
5041
5223
|
* @since BizKit 3.0.0
|
|
5042
|
-
* @example
|
|
5224
|
+
* @example
|
|
5043
5225
|
* ```tsx
|
|
5044
5226
|
* ty.getUserInfo({
|
|
5045
5227
|
* success: data => {
|
|
@@ -5122,7 +5304,7 @@ declare namespace ty {
|
|
|
5122
5304
|
* 切换全屋首页模式
|
|
5123
5305
|
* @public
|
|
5124
5306
|
* @since BizKit 4.13.7
|
|
5125
|
-
* @example
|
|
5307
|
+
* @example
|
|
5126
5308
|
* ```tsx
|
|
5127
5309
|
* ty.changeDiyHomeStatus({
|
|
5128
5310
|
* isOn: false,
|
|
@@ -5172,7 +5354,7 @@ declare namespace ty {
|
|
|
5172
5354
|
* 同步当前用户信息到 AIHelp
|
|
5173
5355
|
* @public
|
|
5174
5356
|
* @since BizKit 4.28.2
|
|
5175
|
-
* @example
|
|
5357
|
+
* @example
|
|
5176
5358
|
* ```tsx
|
|
5177
5359
|
* ty.syncUserInfoToAIHelp({
|
|
5178
5360
|
* success: data => {
|
|
@@ -5210,7 +5392,7 @@ declare namespace ty {
|
|
|
5210
5392
|
* 获取消息未读数量
|
|
5211
5393
|
* @public
|
|
5212
5394
|
* @since BizKit 4.19.0
|
|
5213
|
-
* @example
|
|
5395
|
+
* @example
|
|
5214
5396
|
* ```tsx
|
|
5215
5397
|
* ty.getUnreadState({
|
|
5216
5398
|
* messageCenterUnread: false,
|
|
@@ -5293,6 +5475,33 @@ declare namespace ty {
|
|
|
5293
5475
|
* 压缩图片, 在保持原图长宽比基础上先裁剪至目标尺寸, 然后根据文件大小限制去执行质量压缩
|
|
5294
5476
|
* @public
|
|
5295
5477
|
* @since BizKit 3.0.0
|
|
5478
|
+
* @example
|
|
5479
|
+
* ```tsx
|
|
5480
|
+
* // Download a real image to a local path first, then resize it.
|
|
5481
|
+
* ty.downloadFile({
|
|
5482
|
+
* url:
|
|
5483
|
+
* "https://images.tuyacn.com/rms-static/b7bed040-87b8-11eb-864d-a9f07cbbdf37-1616051299140.png?tyName=logo_cn.png",
|
|
5484
|
+
* success: res => {
|
|
5485
|
+
* const path = res.tempFilePath || res.filePath || res.apFilePath;
|
|
5486
|
+
* console.log("downloaded", path);
|
|
5487
|
+
* ty.resizeImage({
|
|
5488
|
+
* aspectFitWidth: 200,
|
|
5489
|
+
* aspectFitHeight: 200,
|
|
5490
|
+
* maxFileSize: 102400,
|
|
5491
|
+
* path: path,
|
|
5492
|
+
* success: data => {
|
|
5493
|
+
* console.log(data);
|
|
5494
|
+
* },
|
|
5495
|
+
* fail: error => {
|
|
5496
|
+
* console.error(error);
|
|
5497
|
+
* },
|
|
5498
|
+
* });
|
|
5499
|
+
* },
|
|
5500
|
+
* fail: error => {
|
|
5501
|
+
* console.error(error);
|
|
5502
|
+
* },
|
|
5503
|
+
* });
|
|
5504
|
+
* ```
|
|
5296
5505
|
* @platform iOS Android
|
|
5297
5506
|
*/
|
|
5298
5507
|
export function resizeImage(params: {
|
|
@@ -5348,6 +5557,31 @@ declare namespace ty {
|
|
|
5348
5557
|
* 旋转图片
|
|
5349
5558
|
* @public
|
|
5350
5559
|
* @since BizKit 3.0.0
|
|
5560
|
+
* @example
|
|
5561
|
+
* ```tsx
|
|
5562
|
+
* // Download a real image to a local path first, then rotate it.
|
|
5563
|
+
* ty.downloadFile({
|
|
5564
|
+
* url:
|
|
5565
|
+
* "https://images.tuyacn.com/rms-static/b7bed040-87b8-11eb-864d-a9f07cbbdf37-1616051299140.png?tyName=logo_cn.png",
|
|
5566
|
+
* success: res => {
|
|
5567
|
+
* const path = res.tempFilePath || res.filePath || res.apFilePath;
|
|
5568
|
+
* console.log("downloaded", path);
|
|
5569
|
+
* ty.rotateImage({
|
|
5570
|
+
* path: path,
|
|
5571
|
+
* orientation: 90,
|
|
5572
|
+
* success: data => {
|
|
5573
|
+
* console.log(data);
|
|
5574
|
+
* },
|
|
5575
|
+
* fail: error => {
|
|
5576
|
+
* console.error(error);
|
|
5577
|
+
* },
|
|
5578
|
+
* });
|
|
5579
|
+
* },
|
|
5580
|
+
* fail: error => {
|
|
5581
|
+
* console.error(error);
|
|
5582
|
+
* },
|
|
5583
|
+
* });
|
|
5584
|
+
* ```
|
|
5351
5585
|
* @platform iOS Android
|
|
5352
5586
|
*/
|
|
5353
5587
|
export function rotateImage(params: {
|
|
@@ -5389,6 +5623,20 @@ declare namespace ty {
|
|
|
5389
5623
|
* 仅用于加密图片保存,不支持普通图片保存
|
|
5390
5624
|
* @public
|
|
5391
5625
|
* @since BizKit 3.0.0
|
|
5626
|
+
* @example
|
|
5627
|
+
* ```tsx
|
|
5628
|
+
* ty.saveToAlbum({
|
|
5629
|
+
* url: "https://images.tuyacn.com/rms-static/b7bed040-87b8-11eb-864d-a9f07cbbdf37-1616051299140.png?tyName=logo_cn.png",
|
|
5630
|
+
* encryptKey: "your-encrypt-key",
|
|
5631
|
+
* orientation: 0,
|
|
5632
|
+
* success: data => {
|
|
5633
|
+
* console.log(data);
|
|
5634
|
+
* },
|
|
5635
|
+
* fail: error => {
|
|
5636
|
+
* console.error(error);
|
|
5637
|
+
* },
|
|
5638
|
+
* });
|
|
5639
|
+
* ```
|
|
5392
5640
|
* @platform iOS Android
|
|
5393
5641
|
*/
|
|
5394
5642
|
export function saveToAlbum(params: {
|
|
@@ -5434,6 +5682,17 @@ declare namespace ty {
|
|
|
5434
5682
|
* 截图
|
|
5435
5683
|
* @public
|
|
5436
5684
|
* @since BizKit 4.8.5
|
|
5685
|
+
* @example
|
|
5686
|
+
* ```tsx
|
|
5687
|
+
* ty.takeScreenShot({
|
|
5688
|
+
* success: data => {
|
|
5689
|
+
* console.log(data);
|
|
5690
|
+
* },
|
|
5691
|
+
* fail: error => {
|
|
5692
|
+
* console.error(error);
|
|
5693
|
+
* },
|
|
5694
|
+
* });
|
|
5695
|
+
* ```
|
|
5437
5696
|
* @platform iOS Android
|
|
5438
5697
|
*/
|
|
5439
5698
|
export function takeScreenShot(params?: {
|
|
@@ -5468,6 +5727,33 @@ declare namespace ty {
|
|
|
5468
5727
|
* Video转Gif
|
|
5469
5728
|
* @public
|
|
5470
5729
|
* @since BizKit 4.25.0
|
|
5730
|
+
* @example
|
|
5731
|
+
* ```tsx
|
|
5732
|
+
* // Download a real video to a local path first, then convert it to a gif.
|
|
5733
|
+
* ty.downloadFile({
|
|
5734
|
+
* url:
|
|
5735
|
+
* "https://images.tuyacn.com/rms-static/05b751a0-3596-11ed-acd5-2f6ea556a3fd-1663315397562.mp4",
|
|
5736
|
+
* success: res => {
|
|
5737
|
+
* const videoFilePath = res.tempFilePath || res.filePath || res.apFilePath;
|
|
5738
|
+
* console.log("downloaded", videoFilePath);
|
|
5739
|
+
* ty.convertVideoToGif({
|
|
5740
|
+
* videoFilePath: videoFilePath,
|
|
5741
|
+
* frameRate: 5,
|
|
5742
|
+
* startTime: 0,
|
|
5743
|
+
* durationTime: 2,
|
|
5744
|
+
* success: data => {
|
|
5745
|
+
* console.log(data);
|
|
5746
|
+
* },
|
|
5747
|
+
* fail: error => {
|
|
5748
|
+
* console.error(error);
|
|
5749
|
+
* },
|
|
5750
|
+
* });
|
|
5751
|
+
* },
|
|
5752
|
+
* fail: error => {
|
|
5753
|
+
* console.error(error);
|
|
5754
|
+
* },
|
|
5755
|
+
* });
|
|
5756
|
+
* ```
|
|
5471
5757
|
* @platform iOS Android
|
|
5472
5758
|
*/
|
|
5473
5759
|
export function convertVideoToGif(params: {
|
|
@@ -5531,6 +5817,19 @@ declare namespace ty {
|
|
|
5531
5817
|
* GIF转成图片组
|
|
5532
5818
|
* @public
|
|
5533
5819
|
* @since BizKit 4.25.0
|
|
5820
|
+
* @example
|
|
5821
|
+
* ```tsx
|
|
5822
|
+
* ty.convertGifToImages({
|
|
5823
|
+
* gifFilePath: "/path/to/file.gif",
|
|
5824
|
+
* quality: 0.8,
|
|
5825
|
+
* success: data => {
|
|
5826
|
+
* console.log(data);
|
|
5827
|
+
* },
|
|
5828
|
+
* fail: error => {
|
|
5829
|
+
* console.error(error);
|
|
5830
|
+
* },
|
|
5831
|
+
* });
|
|
5832
|
+
* ```
|
|
5534
5833
|
* @platform iOS Android
|
|
5535
5834
|
*/
|
|
5536
5835
|
export function convertGifToImages(params: {
|
|
@@ -5584,6 +5883,33 @@ declare namespace ty {
|
|
|
5584
5883
|
* 视频抽帧转成图片组,支持裁切和压缩
|
|
5585
5884
|
* @public
|
|
5586
5885
|
* @since BizKit 4.28.0
|
|
5886
|
+
* @example
|
|
5887
|
+
* ```tsx
|
|
5888
|
+
* // Download a real video to a local path first, then extract frames to images.
|
|
5889
|
+
* ty.downloadFile({
|
|
5890
|
+
* url:
|
|
5891
|
+
* "https://images.tuyacn.com/rms-static/05b751a0-3596-11ed-acd5-2f6ea556a3fd-1663315397562.mp4",
|
|
5892
|
+
* success: res => {
|
|
5893
|
+
* const videoFilePath = res.tempFilePath || res.filePath || res.apFilePath;
|
|
5894
|
+
* console.log("downloaded", videoFilePath);
|
|
5895
|
+
* ty.convertVideoToImages({
|
|
5896
|
+
* videoFilePath: videoFilePath,
|
|
5897
|
+
* frameRate: 1,
|
|
5898
|
+
* startTime: 0,
|
|
5899
|
+
* durationTime: 3,
|
|
5900
|
+
* success: data => {
|
|
5901
|
+
* console.log(data);
|
|
5902
|
+
* },
|
|
5903
|
+
* fail: error => {
|
|
5904
|
+
* console.error(error);
|
|
5905
|
+
* },
|
|
5906
|
+
* });
|
|
5907
|
+
* },
|
|
5908
|
+
* fail: error => {
|
|
5909
|
+
* console.error(error);
|
|
5910
|
+
* },
|
|
5911
|
+
* });
|
|
5912
|
+
* ```
|
|
5587
5913
|
* @platform iOS Android
|
|
5588
5914
|
*/
|
|
5589
5915
|
export function convertVideoToImages(params: {
|
|
@@ -5691,7 +6017,7 @@ declare namespace ty {
|
|
|
5691
6017
|
* 获取websocket的连接状态
|
|
5692
6018
|
* @public
|
|
5693
6019
|
* @since BizKit 3.6.0
|
|
5694
|
-
* @example
|
|
6020
|
+
* @example
|
|
5695
6021
|
* ```tsx
|
|
5696
6022
|
* ty.getWebSocketStatus({
|
|
5697
6023
|
* success: data => {
|
|
@@ -5735,7 +6061,7 @@ declare namespace ty {
|
|
|
5735
6061
|
* 获取websocket的连接状态
|
|
5736
6062
|
* @public
|
|
5737
6063
|
* @since BizKit 3.6.0
|
|
5738
|
-
* @example
|
|
6064
|
+
* @example
|
|
5739
6065
|
* ```tsx
|
|
5740
6066
|
* ty.getWebSocketStatus({
|
|
5741
6067
|
* success: data => {
|
|
@@ -5760,7 +6086,7 @@ declare namespace ty {
|
|
|
5760
6086
|
* 绑定微信
|
|
5761
6087
|
* @public
|
|
5762
6088
|
* @since BizKit 4.5.1
|
|
5763
|
-
* @example
|
|
6089
|
+
* @example
|
|
5764
6090
|
* ```tsx
|
|
5765
6091
|
* ty.bindWechat({
|
|
5766
6092
|
* success: data => {
|
|
@@ -5798,7 +6124,7 @@ declare namespace ty {
|
|
|
5798
6124
|
* 是否支持微信绑定
|
|
5799
6125
|
* @public
|
|
5800
6126
|
* @since BizKit 4.5.1
|
|
5801
|
-
* @example
|
|
6127
|
+
* @example
|
|
5802
6128
|
* ```tsx
|
|
5803
6129
|
* ty.isSupportWechat({
|
|
5804
6130
|
* success: data => {
|
|
@@ -5842,7 +6168,7 @@ declare namespace ty {
|
|
|
5842
6168
|
* 跳转微信小程序
|
|
5843
6169
|
* @public
|
|
5844
6170
|
* @since BizKit 4.5.1
|
|
5845
|
-
* @example
|
|
6171
|
+
* @example
|
|
5846
6172
|
* ```tsx
|
|
5847
6173
|
* ty.gotoWechatMiniApp({
|
|
5848
6174
|
* miniAppId: "gh_xxxxxxxxxxxx",
|
|
@@ -5901,7 +6227,7 @@ declare namespace ty {
|
|
|
5901
6227
|
* 是否正在通话中
|
|
5902
6228
|
* @public
|
|
5903
6229
|
* @since BizKit 3.7.2
|
|
5904
|
-
* @example
|
|
6230
|
+
* @example
|
|
5905
6231
|
* ```tsx
|
|
5906
6232
|
* ty.isCalling({
|
|
5907
6233
|
* success: data => {
|
|
@@ -5945,7 +6271,7 @@ declare namespace ty {
|
|
|
5945
6271
|
* 是否正在通话中
|
|
5946
6272
|
* @public
|
|
5947
6273
|
* @since BizKit 3.7.2
|
|
5948
|
-
* @example
|
|
6274
|
+
* @example
|
|
5949
6275
|
* ```tsx
|
|
5950
6276
|
* ty.canLaunchCall({
|
|
5951
6277
|
* success: data => {
|
|
@@ -5989,7 +6315,7 @@ declare namespace ty {
|
|
|
5989
6315
|
* 发起呼叫
|
|
5990
6316
|
* @public
|
|
5991
6317
|
* @since BizKit 3.7.2
|
|
5992
|
-
* @example
|
|
6318
|
+
* @example
|
|
5993
6319
|
* ```tsx
|
|
5994
6320
|
* ty.launchCall({
|
|
5995
6321
|
* targetId: "vdevo173371369318062",
|
|
@@ -6046,7 +6372,7 @@ declare namespace ty {
|
|
|
6046
6372
|
* 添加消息监听
|
|
6047
6373
|
* @public
|
|
6048
6374
|
* @since BizKit 3.6.0
|
|
6049
|
-
* @example
|
|
6375
|
+
* @example
|
|
6050
6376
|
* ```tsx
|
|
6051
6377
|
* ty.onAIAssistantChange(e => {
|
|
6052
6378
|
* console.log(e);
|
|
@@ -6062,7 +6388,7 @@ declare namespace ty {
|
|
|
6062
6388
|
* 添加消息监听
|
|
6063
6389
|
* @public
|
|
6064
6390
|
* @since BizKit 3.6.0
|
|
6065
|
-
* @example
|
|
6391
|
+
* @example
|
|
6066
6392
|
* ```tsx
|
|
6067
6393
|
* const listener = function (res) { console.log(res) }
|
|
6068
6394
|
* ty.onAIAssistantChange(listener)
|
|
@@ -6078,7 +6404,7 @@ declare namespace ty {
|
|
|
6078
6404
|
* 监听国家选择页面的选择结果
|
|
6079
6405
|
* @public
|
|
6080
6406
|
* @since BizKit 3.0.0
|
|
6081
|
-
* @example
|
|
6407
|
+
* @example
|
|
6082
6408
|
* ```tsx
|
|
6083
6409
|
* ty.onCountrySelectResult(e => {
|
|
6084
6410
|
* console.log('[event]', e);
|
|
@@ -6103,7 +6429,7 @@ declare namespace ty {
|
|
|
6103
6429
|
* 监听国家选择页面的选择结果
|
|
6104
6430
|
* @public
|
|
6105
6431
|
* @since BizKit 3.0.0
|
|
6106
|
-
* @example
|
|
6432
|
+
* @example
|
|
6107
6433
|
* ```tsx
|
|
6108
6434
|
* const listener = function (res) { console.log(res) }
|
|
6109
6435
|
* ty.onCountrySelectResult(listener)
|
|
@@ -6119,6 +6445,12 @@ declare namespace ty {
|
|
|
6119
6445
|
* 监听图片或视频上传进度变化,取消监听请调用 offUploadProgressUpdate
|
|
6120
6446
|
* @public
|
|
6121
6447
|
* @since BizKit 3.0.0
|
|
6448
|
+
* @example
|
|
6449
|
+
* ```tsx
|
|
6450
|
+
* ty.onUploadProgressUpdate(e => {
|
|
6451
|
+
* console.log(e);
|
|
6452
|
+
* });
|
|
6453
|
+
* ```
|
|
6122
6454
|
* @platform iOS
|
|
6123
6455
|
*/
|
|
6124
6456
|
export function onUploadProgressUpdate(
|
|
@@ -6129,7 +6461,7 @@ declare namespace ty {
|
|
|
6129
6461
|
* 监听图片或视频上传进度变化,取消监听请调用 offUploadProgressUpdate
|
|
6130
6462
|
* @public
|
|
6131
6463
|
* @since BizKit 3.0.0
|
|
6132
|
-
* @example
|
|
6464
|
+
* @example
|
|
6133
6465
|
* ```tsx
|
|
6134
6466
|
* const listener = function (res) { console.log(res) }
|
|
6135
6467
|
* ty.onUploadProgressUpdate(listener)
|
|
@@ -6145,7 +6477,7 @@ declare namespace ty {
|
|
|
6145
6477
|
* 页面刷新事件
|
|
6146
6478
|
* @public
|
|
6147
6479
|
* @since BizKit 4.2.0
|
|
6148
|
-
* @example
|
|
6480
|
+
* @example
|
|
6149
6481
|
* ```tsx
|
|
6150
6482
|
* ty.onPageRefresh(e => {
|
|
6151
6483
|
* console.log(e);
|
|
@@ -6159,7 +6491,7 @@ declare namespace ty {
|
|
|
6159
6491
|
* 页面刷新事件
|
|
6160
6492
|
* @public
|
|
6161
6493
|
* @since BizKit 4.2.0
|
|
6162
|
-
* @example
|
|
6494
|
+
* @example
|
|
6163
6495
|
* ```tsx
|
|
6164
6496
|
* const listener = function (res) { console.log(res) }
|
|
6165
6497
|
* ty.onPageRefresh(listener)
|
|
@@ -6175,7 +6507,7 @@ declare namespace ty {
|
|
|
6175
6507
|
* 接收通过emitChannel发送的事件
|
|
6176
6508
|
* @public
|
|
6177
6509
|
* @since BizKit 3.0.0
|
|
6178
|
-
* @example
|
|
6510
|
+
* @example
|
|
6179
6511
|
* ```tsx
|
|
6180
6512
|
* ty.onReceiveMessage(e => {
|
|
6181
6513
|
* console.log(e);
|
|
@@ -6191,7 +6523,7 @@ declare namespace ty {
|
|
|
6191
6523
|
* 接收通过emitChannel发送的事件
|
|
6192
6524
|
* @public
|
|
6193
6525
|
* @since BizKit 3.0.0
|
|
6194
|
-
* @example
|
|
6526
|
+
* @example
|
|
6195
6527
|
* ```tsx
|
|
6196
6528
|
* const listener = function (res) { console.log(res) }
|
|
6197
6529
|
* ty.onReceiveMessage(listener)
|
|
@@ -6207,7 +6539,7 @@ declare namespace ty {
|
|
|
6207
6539
|
* 订单状态监听, 只有在addOrderStatusListener之后, 才能收到监听
|
|
6208
6540
|
* @public
|
|
6209
6541
|
* @since BizKit 3.1.4
|
|
6210
|
-
* @example
|
|
6542
|
+
* @example
|
|
6211
6543
|
* ```tsx
|
|
6212
6544
|
* ty.onOrderStatusListener(e => {
|
|
6213
6545
|
* console.log(e);
|
|
@@ -6223,7 +6555,7 @@ declare namespace ty {
|
|
|
6223
6555
|
* 订单状态监听, 只有在addOrderStatusListener之后, 才能收到监听
|
|
6224
6556
|
* @public
|
|
6225
6557
|
* @since BizKit 3.1.4
|
|
6226
|
-
* @example
|
|
6558
|
+
* @example
|
|
6227
6559
|
* ```tsx
|
|
6228
6560
|
* const listener = function (res) { console.log(res) }
|
|
6229
6561
|
* ty.onOrderStatusListener(listener)
|
|
@@ -6239,7 +6571,7 @@ declare namespace ty {
|
|
|
6239
6571
|
* 用户自选备选结算监听, 只有在addOrderStatusListener之后, 才能收到监听
|
|
6240
6572
|
* @public
|
|
6241
6573
|
* @since BizKit 4.8.2
|
|
6242
|
-
* @example
|
|
6574
|
+
* @example
|
|
6243
6575
|
* ```tsx
|
|
6244
6576
|
* ty.onUserSelectedAlternativeBilling(e => {
|
|
6245
6577
|
* console.log(e);
|
|
@@ -6255,7 +6587,7 @@ declare namespace ty {
|
|
|
6255
6587
|
* 用户自选备选结算监听, 只有在addOrderStatusListener之后, 才能收到监听
|
|
6256
6588
|
* @public
|
|
6257
6589
|
* @since BizKit 4.8.2
|
|
6258
|
-
* @example
|
|
6590
|
+
* @example
|
|
6259
6591
|
* ```tsx
|
|
6260
6592
|
* const listener = function (res) { console.log(res) }
|
|
6261
6593
|
* ty.onUserSelectedAlternativeBilling(listener)
|
|
@@ -6271,7 +6603,7 @@ declare namespace ty {
|
|
|
6271
6603
|
* 统一路由事件通知;onRouterEvent 注册事件回调,offRouterEvent 移除事件回调
|
|
6272
6604
|
* @public
|
|
6273
6605
|
* @since BizKit 3.0.0
|
|
6274
|
-
* @example
|
|
6606
|
+
* @example
|
|
6275
6607
|
* ```tsx
|
|
6276
6608
|
* ty.onRouterEvent(e => {
|
|
6277
6609
|
* console.log(e);
|
|
@@ -6285,7 +6617,7 @@ declare namespace ty {
|
|
|
6285
6617
|
* 统一路由事件通知;onRouterEvent 注册事件回调,offRouterEvent 移除事件回调
|
|
6286
6618
|
* @public
|
|
6287
6619
|
* @since BizKit 3.0.0
|
|
6288
|
-
* @example
|
|
6620
|
+
* @example
|
|
6289
6621
|
* ```tsx
|
|
6290
6622
|
* const listener = function (res) { console.log(res) }
|
|
6291
6623
|
* ty.onRouterEvent(listener)
|
|
@@ -6299,7 +6631,7 @@ declare namespace ty {
|
|
|
6299
6631
|
* 万能路由界面返回数据;onRouterResult 注册事件回调,offRouterResult 移除事件回调
|
|
6300
6632
|
* @public
|
|
6301
6633
|
* @since BizKit 3.0.0
|
|
6302
|
-
* @example
|
|
6634
|
+
* @example
|
|
6303
6635
|
* ```tsx
|
|
6304
6636
|
* ty.onRouterResult(e => {
|
|
6305
6637
|
* console.log(e);
|
|
@@ -6315,7 +6647,7 @@ declare namespace ty {
|
|
|
6315
6647
|
* 万能路由界面返回数据;onRouterResult 注册事件回调,offRouterResult 移除事件回调
|
|
6316
6648
|
* @public
|
|
6317
6649
|
* @since BizKit 3.0.0
|
|
6318
|
-
* @example
|
|
6650
|
+
* @example
|
|
6319
6651
|
* ```tsx
|
|
6320
6652
|
* const listener = function (res) { console.log(res) }
|
|
6321
6653
|
* ty.onRouterResult(listener)
|
|
@@ -6332,7 +6664,7 @@ declare namespace ty {
|
|
|
6332
6664
|
* 当消息中心、常见问题/帮助中心、我的反馈、三方客服(AIHelp)的未读数量变化时触发
|
|
6333
6665
|
* @public
|
|
6334
6666
|
* @since BizKit 4.19.0
|
|
6335
|
-
* @example
|
|
6667
|
+
* @example
|
|
6336
6668
|
* ```tsx
|
|
6337
6669
|
* ty.onUnreadStateChanged(e => {
|
|
6338
6670
|
* console.log(e);
|
|
@@ -6349,7 +6681,7 @@ declare namespace ty {
|
|
|
6349
6681
|
* 当消息中心、常见问题/帮助中心、我的反馈、三方客服(AIHelp)的未读数量变化时触发
|
|
6350
6682
|
* @public
|
|
6351
6683
|
* @since BizKit 4.19.0
|
|
6352
|
-
* @example
|
|
6684
|
+
* @example
|
|
6353
6685
|
* ```tsx
|
|
6354
6686
|
* const listener = function (res) { console.log(res) }
|
|
6355
6687
|
* ty.onUnreadStateChanged(listener)
|
|
@@ -6365,6 +6697,12 @@ declare namespace ty {
|
|
|
6365
6697
|
* RN或小程序页面关闭事件(Android独有)
|
|
6366
6698
|
* @public
|
|
6367
6699
|
* @since BizKit 3.4.4
|
|
6700
|
+
* @example
|
|
6701
|
+
* ```tsx
|
|
6702
|
+
* ty.onFrontPageClose(e => {
|
|
6703
|
+
* console.log(e);
|
|
6704
|
+
* });
|
|
6705
|
+
* ```
|
|
6368
6706
|
* @platform iOS Android
|
|
6369
6707
|
*/
|
|
6370
6708
|
export function onFrontPageClose(
|
|
@@ -6375,7 +6713,7 @@ declare namespace ty {
|
|
|
6375
6713
|
* RN或小程序页面关闭事件(Android独有)
|
|
6376
6714
|
* @public
|
|
6377
6715
|
* @since BizKit 3.4.4
|
|
6378
|
-
* @example
|
|
6716
|
+
* @example
|
|
6379
6717
|
* ```tsx
|
|
6380
6718
|
* const listener = function (res) { console.log(res) }
|
|
6381
6719
|
* ty.onFrontPageClose(listener)
|
|
@@ -6391,7 +6729,7 @@ declare namespace ty {
|
|
|
6391
6729
|
* onWebSocketStatusChange 接受消息
|
|
6392
6730
|
* @public
|
|
6393
6731
|
* @since BizKit 3.6.0
|
|
6394
|
-
* @example
|
|
6732
|
+
* @example
|
|
6395
6733
|
* ```tsx
|
|
6396
6734
|
* ty.onWebSocketStatusChange(e => {
|
|
6397
6735
|
* console.log(e);
|
|
@@ -6407,7 +6745,7 @@ declare namespace ty {
|
|
|
6407
6745
|
* onWebSocketStatusChange 接受消息
|
|
6408
6746
|
* @public
|
|
6409
6747
|
* @since BizKit 3.6.0
|
|
6410
|
-
* @example
|
|
6748
|
+
* @example
|
|
6411
6749
|
* ```tsx
|
|
6412
6750
|
* const listener = function (res) { console.log(res) }
|
|
6413
6751
|
* ty.onWebSocketStatusChange(listener)
|
|
@@ -6831,98 +7169,98 @@ declare namespace ty {
|
|
|
6831
7169
|
createTime: number
|
|
6832
7170
|
}
|
|
6833
7171
|
|
|
6834
|
-
/** @since BizKit
|
|
7172
|
+
/** @since BizKit 4.33.7 */
|
|
6835
7173
|
export interface OpenInputBarInputStyle {
|
|
6836
7174
|
/**
|
|
6837
7175
|
* 是否允许关闭直连模式
|
|
6838
|
-
* @since BizKit
|
|
7176
|
+
* @since BizKit 4.33.7
|
|
6839
7177
|
*/
|
|
6840
7178
|
optional: boolean
|
|
6841
7179
|
/**
|
|
6842
7180
|
* 输入框默认提示词
|
|
6843
|
-
* @since BizKit
|
|
7181
|
+
* @since BizKit 4.33.7
|
|
6844
7182
|
*/
|
|
6845
7183
|
defaultInput?: string
|
|
6846
7184
|
/**
|
|
6847
7185
|
* 能力配置字典,结构由服务端约定(如 ACTUAL_TIME_CHAT / File_Upload 等)
|
|
6848
|
-
* @since BizKit
|
|
7186
|
+
* @since BizKit 4.33.7
|
|
6849
7187
|
*/
|
|
6850
7188
|
abilities?: Record<string, any>
|
|
6851
7189
|
}
|
|
6852
7190
|
|
|
6853
|
-
/** @since BizKit
|
|
7191
|
+
/** @since BizKit 4.33.7 */
|
|
6854
7192
|
export interface OpenInputBarQuery {
|
|
6855
7193
|
/**
|
|
6856
7194
|
* 用户编辑后的发送文案
|
|
6857
|
-
* @since BizKit
|
|
7195
|
+
* @since BizKit 4.33.7
|
|
6858
7196
|
*/
|
|
6859
7197
|
querySendText: string
|
|
6860
7198
|
/**
|
|
6861
7199
|
* query 行为类型,0 表示直接发送
|
|
6862
|
-
* @since BizKit
|
|
7200
|
+
* @since BizKit 4.33.7
|
|
6863
7201
|
*/
|
|
6864
7202
|
queryActionType: number
|
|
6865
7203
|
/**
|
|
6866
7204
|
* Agent Key
|
|
6867
|
-
* @since BizKit
|
|
7205
|
+
* @since BizKit 4.33.7
|
|
6868
7206
|
*/
|
|
6869
7207
|
queryAgentKey?: string
|
|
6870
7208
|
/**
|
|
6871
7209
|
* 应用类型(云端定义为数值枚举)
|
|
6872
|
-
* @since BizKit
|
|
7210
|
+
* @since BizKit 4.33.7
|
|
6873
7211
|
*/
|
|
6874
7212
|
applicationType?: number
|
|
6875
7213
|
/**
|
|
6876
7214
|
* 应用 Key
|
|
6877
|
-
* @since BizKit
|
|
7215
|
+
* @since BizKit 4.33.7
|
|
6878
7216
|
*/
|
|
6879
7217
|
applicationKey?: string
|
|
6880
7218
|
/**
|
|
6881
7219
|
* Agent 名称,用于 native UI 展示
|
|
6882
|
-
* @since BizKit
|
|
7220
|
+
* @since BizKit 4.33.7
|
|
6883
7221
|
*/
|
|
6884
7222
|
queryAgentName?: string
|
|
6885
7223
|
/**
|
|
6886
7224
|
* 输入样式,与小程序 InputStyle 协议对齐;云端未配置时下发 null,native 按可空处理
|
|
6887
|
-
* @since BizKit
|
|
7225
|
+
* @since BizKit 4.33.7
|
|
6888
7226
|
*/
|
|
6889
7227
|
inputStyle?: OpenInputBarInputStyle
|
|
6890
7228
|
}
|
|
6891
7229
|
|
|
6892
|
-
/** @since BizKit
|
|
7230
|
+
/** @since BizKit 4.33.7 */
|
|
6893
7231
|
export interface OpenInputBarBubbleJson {
|
|
6894
7232
|
/**
|
|
6895
7233
|
* 气泡类型(云端定义为数值枚举)
|
|
6896
|
-
* @since BizKit
|
|
7234
|
+
* @since BizKit 4.33.7
|
|
6897
7235
|
*/
|
|
6898
7236
|
bubbleType?: number
|
|
6899
7237
|
/**
|
|
6900
7238
|
* 气泡行为类型,固定为 1
|
|
6901
|
-
* @since BizKit
|
|
7239
|
+
* @since BizKit 4.33.7
|
|
6902
7240
|
*/
|
|
6903
7241
|
bubbleActionType: number
|
|
6904
7242
|
/**
|
|
6905
7243
|
* 气泡文案描述
|
|
6906
|
-
* @since BizKit
|
|
7244
|
+
* @since BizKit 4.33.7
|
|
6907
7245
|
*/
|
|
6908
7246
|
bubbleDesc?: string
|
|
6909
7247
|
/**
|
|
6910
7248
|
* 话题 query 列表,单条传递
|
|
6911
|
-
* @since BizKit
|
|
7249
|
+
* @since BizKit 4.33.7
|
|
6912
7250
|
*/
|
|
6913
7251
|
queryList: OpenInputBarQuery[]
|
|
6914
7252
|
}
|
|
6915
7253
|
|
|
6916
|
-
/** @since BizKit
|
|
7254
|
+
/** @since BizKit 4.33.7 */
|
|
6917
7255
|
export interface OpenInputBarReq {
|
|
6918
7256
|
/**
|
|
6919
7257
|
* 目标页面唯一标识,App 端按 udid 匹配目标页面
|
|
6920
|
-
* @since BizKit
|
|
7258
|
+
* @since BizKit 4.33.7
|
|
6921
7259
|
*/
|
|
6922
7260
|
udid: string
|
|
6923
7261
|
/**
|
|
6924
7262
|
* 气泡协议字段
|
|
6925
|
-
* @since BizKit
|
|
7263
|
+
* @since BizKit 4.33.7
|
|
6926
7264
|
*/
|
|
6927
7265
|
bubbleJson: OpenInputBarBubbleJson
|
|
6928
7266
|
}
|
|
@@ -10024,7 +10362,7 @@ declare namespace ty {
|
|
|
10024
10362
|
* Asr 语音识别状态
|
|
10025
10363
|
* @public
|
|
10026
10364
|
* @since BizKit 3.6.0
|
|
10027
|
-
* @example
|
|
10365
|
+
* @example
|
|
10028
10366
|
* ```tsx
|
|
10029
10367
|
* const manager = await ty.getAsrListenerManager({
|
|
10030
10368
|
* homeId: "xx",
|
|
@@ -10076,7 +10414,7 @@ declare namespace ty {
|
|
|
10076
10414
|
* 关闭麦克风,关闭后识音要等到全部识别完成才结束
|
|
10077
10415
|
* @public
|
|
10078
10416
|
* @since BizKit 3.6.0
|
|
10079
|
-
* @example
|
|
10417
|
+
* @example
|
|
10080
10418
|
* ```tsx
|
|
10081
10419
|
* const manager = await ty.getAsrListenerManager({
|
|
10082
10420
|
* homeId: "xx",
|
|
@@ -10122,7 +10460,7 @@ declare namespace ty {
|
|
|
10122
10460
|
* 关闭麦克风,关闭后识音要等到全部识别完成才结束
|
|
10123
10461
|
* @public
|
|
10124
10462
|
* @since BizKit 3.6.0
|
|
10125
|
-
* @example
|
|
10463
|
+
* @example
|
|
10126
10464
|
* ```tsx
|
|
10127
10465
|
* const manager = await ty.getAsrListenerManager({
|
|
10128
10466
|
* homeId: "xx",
|
|
@@ -10168,7 +10506,7 @@ declare namespace ty {
|
|
|
10168
10506
|
* 开始监听 + 识音
|
|
10169
10507
|
* @public
|
|
10170
10508
|
* @since BizKit 3.6.0
|
|
10171
|
-
* @example
|
|
10509
|
+
* @example
|
|
10172
10510
|
* ```tsx
|
|
10173
10511
|
* const manager = await ty.getAsrListenerManager({
|
|
10174
10512
|
* homeId: "xx",
|
|
@@ -10213,7 +10551,7 @@ declare namespace ty {
|
|
|
10213
10551
|
* 取消 Asr 语音识别监听
|
|
10214
10552
|
* @public
|
|
10215
10553
|
* @since BizKit 3.6.0
|
|
10216
|
-
* @example
|
|
10554
|
+
* @example
|
|
10217
10555
|
* ```tsx
|
|
10218
10556
|
* const manager = await ty.getAsrListenerManager({
|
|
10219
10557
|
* homeId: "xx",
|
|
@@ -10258,7 +10596,7 @@ declare namespace ty {
|
|
|
10258
10596
|
* 创建拾音监听
|
|
10259
10597
|
* @public
|
|
10260
10598
|
* @since BizKit 3.6.0
|
|
10261
|
-
* @example
|
|
10599
|
+
* @example
|
|
10262
10600
|
* ```tsx
|
|
10263
10601
|
* const manager = await ty.getAsrListenerManager({
|
|
10264
10602
|
* homeId: "xx",
|
|
@@ -10323,7 +10661,7 @@ declare namespace ty {
|
|
|
10323
10661
|
* log日志
|
|
10324
10662
|
* @public
|
|
10325
10663
|
* @since BizKit 3.9.0
|
|
10326
|
-
* @example
|
|
10664
|
+
* @example
|
|
10327
10665
|
* ```tsx
|
|
10328
10666
|
* const manager = await ty.getLogManager({
|
|
10329
10667
|
* tag: "ttt-demo",
|
|
@@ -10372,7 +10710,7 @@ declare namespace ty {
|
|
|
10372
10710
|
* error日志
|
|
10373
10711
|
* @public
|
|
10374
10712
|
* @since BizKit 3.9.0
|
|
10375
|
-
* @example
|
|
10713
|
+
* @example
|
|
10376
10714
|
* ```tsx
|
|
10377
10715
|
* const manager = await ty.getLogManager({
|
|
10378
10716
|
* tag: "ttt-demo",
|
|
@@ -10421,7 +10759,7 @@ declare namespace ty {
|
|
|
10421
10759
|
* 上报日志
|
|
10422
10760
|
* @public
|
|
10423
10761
|
* @since BizKit 3.9.0
|
|
10424
|
-
* @example
|
|
10762
|
+
* @example
|
|
10425
10763
|
* ```tsx
|
|
10426
10764
|
* const manager = await ty.getLogManager({
|
|
10427
10765
|
* tag: "ttt-demo",
|
|
@@ -10470,7 +10808,7 @@ declare namespace ty {
|
|
|
10470
10808
|
* debug日志
|
|
10471
10809
|
* @public
|
|
10472
10810
|
* @since BizKit 3.9.0
|
|
10473
|
-
* @example
|
|
10811
|
+
* @example
|
|
10474
10812
|
* ```tsx
|
|
10475
10813
|
* const manager = await ty.getLogManager({
|
|
10476
10814
|
* tag: "ttt-demo",
|
|
@@ -10519,7 +10857,7 @@ declare namespace ty {
|
|
|
10519
10857
|
* 创建日志实例对象
|
|
10520
10858
|
* @public
|
|
10521
10859
|
* @since BizKit 3.9.0
|
|
10522
|
-
* @example
|
|
10860
|
+
* @example
|
|
10523
10861
|
* ```tsx
|
|
10524
10862
|
* const manager = await ty.getLogManager({
|
|
10525
10863
|
* tag: "ttt-demo",
|
|
@@ -10565,7 +10903,7 @@ declare namespace ty {
|
|
|
10565
10903
|
* 连接MQTT
|
|
10566
10904
|
* @public
|
|
10567
10905
|
* @since BizKit 4.12.0
|
|
10568
|
-
* @example
|
|
10906
|
+
* @example
|
|
10569
10907
|
* ```tsx
|
|
10570
10908
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10571
10909
|
* client.connect({
|
|
@@ -10638,7 +10976,7 @@ declare namespace ty {
|
|
|
10638
10976
|
* 断开MQTT
|
|
10639
10977
|
* @public
|
|
10640
10978
|
* @since BizKit 4.12.0
|
|
10641
|
-
* @example
|
|
10979
|
+
* @example
|
|
10642
10980
|
* ```tsx
|
|
10643
10981
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10644
10982
|
* client.disconnect({
|
|
@@ -10677,7 +11015,7 @@ declare namespace ty {
|
|
|
10677
11015
|
* 订阅主题
|
|
10678
11016
|
* @public
|
|
10679
11017
|
* @since BizKit 4.12.0
|
|
10680
|
-
* @example
|
|
11018
|
+
* @example
|
|
10681
11019
|
* ```tsx
|
|
10682
11020
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10683
11021
|
* client.subscribe({
|
|
@@ -10722,7 +11060,7 @@ declare namespace ty {
|
|
|
10722
11060
|
* 取消订阅
|
|
10723
11061
|
* @public
|
|
10724
11062
|
* @since BizKit 4.12.0
|
|
10725
|
-
* @example
|
|
11063
|
+
* @example
|
|
10726
11064
|
* ```tsx
|
|
10727
11065
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10728
11066
|
* client.unsubscribe({
|
|
@@ -10767,7 +11105,7 @@ declare namespace ty {
|
|
|
10767
11105
|
* 发布消息
|
|
10768
11106
|
* @public
|
|
10769
11107
|
* @since BizKit 4.12.0
|
|
10770
|
-
* @example
|
|
11108
|
+
* @example
|
|
10771
11109
|
* ```tsx
|
|
10772
11110
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10773
11111
|
* client.publish({
|
|
@@ -10818,7 +11156,7 @@ declare namespace ty {
|
|
|
10818
11156
|
* 监听MQTT消息
|
|
10819
11157
|
* @public
|
|
10820
11158
|
* @since BizKit 4.12.0
|
|
10821
|
-
* @example
|
|
11159
|
+
* @example
|
|
10822
11160
|
* ```tsx
|
|
10823
11161
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10824
11162
|
* client.onMessage(e => {
|
|
@@ -10846,7 +11184,7 @@ declare namespace ty {
|
|
|
10846
11184
|
* 取消监听MQTT消息
|
|
10847
11185
|
* @public
|
|
10848
11186
|
* @since BizKit 4.12.0
|
|
10849
|
-
* @example
|
|
11187
|
+
* @example
|
|
10850
11188
|
* ```tsx
|
|
10851
11189
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10852
11190
|
* const handler = e => {
|
|
@@ -10876,7 +11214,7 @@ declare namespace ty {
|
|
|
10876
11214
|
* 监听MQTT状态变化
|
|
10877
11215
|
* @public
|
|
10878
11216
|
* @since BizKit 4.12.0
|
|
10879
|
-
* @example
|
|
11217
|
+
* @example
|
|
10880
11218
|
* ```tsx
|
|
10881
11219
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10882
11220
|
* client.onStateChange(e => {
|
|
@@ -10904,7 +11242,7 @@ declare namespace ty {
|
|
|
10904
11242
|
* 取消监听MQTT状态变化
|
|
10905
11243
|
* @public
|
|
10906
11244
|
* @since BizKit 4.12.0
|
|
10907
|
-
* @example
|
|
11245
|
+
* @example
|
|
10908
11246
|
* ```tsx
|
|
10909
11247
|
* const client = await ty.createMQTTClient({ success: () => {}, fail: () => {} });
|
|
10910
11248
|
* const handler = e => {
|
|
@@ -10934,7 +11272,7 @@ declare namespace ty {
|
|
|
10934
11272
|
* 创建MQTT实例
|
|
10935
11273
|
* @public
|
|
10936
11274
|
* @since BizKit 4.12.0
|
|
10937
|
-
* @example
|
|
11275
|
+
* @example
|
|
10938
11276
|
* ```tsx
|
|
10939
11277
|
* const client = await ty.createMQTTClient({
|
|
10940
11278
|
* success: data => {
|
|
@@ -10974,7 +11312,7 @@ declare namespace ty {
|
|
|
10974
11312
|
* 取消注册事件通道,取消注册后将不再接收事件
|
|
10975
11313
|
* @public
|
|
10976
11314
|
* @since BizKit 3.0.0
|
|
10977
|
-
* @example
|
|
11315
|
+
* @example
|
|
10978
11316
|
* ```tsx
|
|
10979
11317
|
* const manager = await ty.registerChannel({
|
|
10980
11318
|
* eventName: "xx",
|
|
@@ -11018,7 +11356,7 @@ declare namespace ty {
|
|
|
11018
11356
|
* 注册事件通道,可用于跨小程序/跨容器通信,需要配合emitChannel、onReceiveMessage使用
|
|
11019
11357
|
* @public
|
|
11020
11358
|
* @since BizKit 3.0.0
|
|
11021
|
-
* @example
|
|
11359
|
+
* @example
|
|
11022
11360
|
* ```tsx
|
|
11023
11361
|
* const manager = await ty.registerChannel({
|
|
11024
11362
|
* eventName: "xx",
|