@ray-js/api 1.5.0-beta.11 → 1.5.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/@types/BaseKit.d.ts +246 -126
- package/@types/BizKit.d.ts +1 -1
- package/@types/MapKit.d.ts +237 -1
- package/@types/MiniKit.d.ts +1 -1
- package/@types/OutdoorKit.d.ts +232 -0
- package/@types/P2PKit.d.ts +24 -2
- package/@types/all-kits.d.ts +1 -0
- package/@types/api-extend.d.ts +8 -2
- package/@types/index.d.ts +87 -0
- package/lib/{BaseKit-3.3.10.d.ts → BaseKit-3.11.0.d.ts} +1 -0
- package/lib/{BaseKit-3.3.10.js → BaseKit-3.11.0.js} +6 -2
- package/lib/BizKit-3.2.7.js +2 -1
- package/lib/DeviceKit-3.3.1.js +2 -1
- package/lib/HomeKit-3.1.4.js +2 -1
- package/lib/{MapKit-3.0.7.d.ts → MapKit-3.4.13.d.ts} +5 -0
- package/lib/{MapKit-3.0.7.js → MapKit-3.4.13.js} +19 -1
- package/lib/MiniKit-3.1.0.js +3 -2
- package/lib/OutdoorKit-1.0.4.d.ts +14 -0
- package/lib/OutdoorKit-1.0.4.js +39 -0
- package/lib/P2PKit-2.0.3.d.ts +1 -0
- package/lib/P2PKit-2.0.3.js +5 -1
- package/lib/PlayNetKit-1.1.3.d.ts +24 -25
- package/lib/PlayNetKit-1.1.3.js +2 -1
- package/lib/all-kits.d.ts +3 -2
- package/lib/all-kits.js +3 -2
- package/lib/cloud/device.d.ts +25 -1
- package/lib/cloud/device.js +15 -1
- package/lib/cloud/doorlock/README.md +62 -0
- package/lib/cloud/doorlock/auth.d.ts +235 -0
- package/lib/cloud/doorlock/auth.js +223 -0
- package/lib/cloud/doorlock/auth.md +323 -0
- package/lib/cloud/doorlock/device.d.ts +137 -0
- package/lib/cloud/doorlock/device.js +187 -0
- package/lib/cloud/doorlock/device.md +265 -0
- package/lib/cloud/doorlock/index.d.ts +10 -0
- package/lib/cloud/doorlock/index.js +20 -0
- package/lib/cloud/doorlock/log.d.ts +113 -0
- package/lib/cloud/doorlock/log.js +53 -0
- package/lib/cloud/doorlock/log.md +153 -0
- package/lib/cloud/doorlock/member-opmode.d.ts +121 -0
- package/lib/cloud/doorlock/member-opmode.js +104 -0
- package/lib/cloud/doorlock/member-opmode.md +279 -0
- package/lib/cloud/doorlock/member.d.ts +110 -0
- package/lib/cloud/doorlock/member.js +72 -0
- package/lib/cloud/doorlock/member.md +276 -0
- package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
- package/lib/cloud/doorlock/offline-pwd.js +67 -0
- package/lib/cloud/doorlock/offline-pwd.md +155 -0
- package/lib/cloud/doorlock/old.d.ts +36 -0
- package/lib/cloud/doorlock/old.js +102 -0
- package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
- package/lib/cloud/doorlock/temp-pwd.js +193 -0
- package/lib/cloud/doorlock/temp-pwd.md +362 -0
- package/lib/cloud/doorlock/unlock-method.d.ts +62 -0
- package/lib/cloud/doorlock/unlock-method.js +85 -0
- package/lib/cloud/doorlock/unlock-method.md +121 -0
- package/lib/cloud/doorlock/unlock.d.ts +89 -0
- package/lib/cloud/doorlock/unlock.js +76 -0
- package/lib/cloud/doorlock/unlock.md +222 -0
- package/lib/cloud/index.d.ts +4 -0
- package/lib/cloud/index.js +10 -1
- package/lib/cloud/interface.d.ts +39 -2
- package/lib/cloud/linkage.d.ts +8 -5
- package/lib/cloud/linkage.js +30 -9
- package/lib/cloud/outdoor.d.ts +15 -0
- package/lib/cloud/outdoor.js +25 -0
- package/lib/cloud/recipe/README.md +36 -0
- package/lib/cloud/recipe/basket.d.ts +220 -0
- package/lib/cloud/recipe/basket.js +328 -0
- package/lib/cloud/recipe/basket.md +431 -0
- package/lib/cloud/recipe/category-list.d.ts +71 -0
- package/lib/cloud/recipe/category-list.js +65 -0
- package/lib/cloud/recipe/category-list.md +132 -0
- package/lib/cloud/recipe/custom.d.ts +177 -0
- package/lib/cloud/recipe/custom.js +171 -0
- package/lib/cloud/recipe/custom.md +265 -0
- package/lib/cloud/recipe/index.d.ts +8 -0
- package/lib/cloud/recipe/index.js +8 -0
- package/lib/cloud/recipe/menu.d.ts +170 -0
- package/lib/cloud/recipe/menu.js +76 -0
- package/lib/cloud/recipe/menu.md +276 -0
- package/lib/cloud/recipe/query.d.ts +87 -0
- package/lib/cloud/recipe/query.js +101 -0
- package/lib/cloud/recipe/query.md +112 -0
- package/lib/cloud/recipe/record.d.ts +54 -0
- package/lib/cloud/recipe/record.js +87 -0
- package/lib/cloud/recipe/record.md +115 -0
- package/lib/cloud/recipe/score.d.ts +69 -0
- package/lib/cloud/recipe/score.js +106 -0
- package/lib/cloud/recipe/score.md +112 -0
- package/lib/cloud/recipe/star.d.ts +131 -0
- package/lib/cloud/recipe/star.js +151 -0
- package/lib/cloud/recipe/star.md +196 -0
- package/lib/cloud/recipe/types.d.ts +7 -0
- package/lib/cloud/recipe/types.js +0 -0
- package/lib/cloud/remoteGroup.d.ts +10 -0
- package/lib/cloud/remoteGroup.js +31 -0
- package/lib/constants.js +1 -1
- package/lib/errorCode.d.ts +4 -0
- package/lib/errorCode.js +3 -0
- package/lib/getCdnUrl/index.d.ts +2 -2
- package/lib/getCdnUrl/index.js +1 -2
- package/lib/getCdnUrl/index.wechat.d.ts +2 -2
- package/lib/getCdnUrl/index.wechat.js +1 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/nativeRouters/common.d.ts +15 -0
- package/lib/nativeRouters/common.js +38 -0
- package/lib/nativeRouters/device.d.ts +59 -0
- package/lib/nativeRouters/device.js +69 -0
- package/lib/nativeRouters/gw.d.ts +23 -0
- package/lib/nativeRouters/gw.js +27 -0
- package/lib/nativeRouters/index.d.ts +6 -1
- package/lib/nativeRouters/index.js +6 -1
- package/lib/nativeRouters/ipc.d.ts +30 -0
- package/lib/nativeRouters/ipc.js +44 -0
- package/lib/nativeRouters/outdoors.d.ts +47 -0
- package/lib/nativeRouters/outdoors.js +41 -0
- package/lib/nativeRouters/remoteGroup.d.ts +22 -0
- package/lib/nativeRouters/remoteGroup.js +11 -0
- package/lib/nativeRouters/root.d.ts +41 -0
- package/lib/nativeRouters/root.js +53 -0
- package/lib/openGroupCreate/index.js +3 -3
- package/lib/panel/i18n/index.d.ts +7 -6
- package/lib/panel/i18n/index.js +26 -11
- package/lib/panel/normalizeNetwork.js +1 -1
- package/lib/utils.d.ts +5 -2
- package/lib/utils.js +46 -20
- package/lib/utils.wechat.d.ts +3 -0
- package/lib/utils.wechat.js +17 -1
- package/lib/viewAPI.d.ts +1 -0
- package/lib/viewAPI.js +4 -3
- package/package.json +9 -8
- package/@types/PlayNetKit.d.ts +0 -444
- package/lib/nativeRouters/scene.d.ts +0 -34
- package/lib/nativeRouters/scene.js +0 -60
package/@types/BaseKit.d.ts
CHANGED
@@ -1,94 +1,7 @@
|
|
1
|
-
declare enum WidgetVersionType {
|
2
|
-
/** 线上版本 */
|
3
|
-
release = 'release',
|
4
|
-
|
5
|
-
/** 预发版本 */
|
6
|
-
preview = 'preview',
|
7
|
-
}
|
8
|
-
|
9
|
-
declare enum WidgetPosition {
|
10
|
-
/** 居底展示 */
|
11
|
-
bottom = 'bottom',
|
12
|
-
|
13
|
-
/** 居顶展示 */
|
14
|
-
top = 'top',
|
15
|
-
}
|
16
|
-
|
17
|
-
declare enum HTTPMethod {
|
18
|
-
/** HTTP 请求 OPTIONS */
|
19
|
-
OPTIONS = 'OPTIONS',
|
20
|
-
|
21
|
-
/** HTTP 请求 GET */
|
22
|
-
GET = 'GET',
|
23
|
-
|
24
|
-
/** HTTP 请求 HEAD */
|
25
|
-
HEAD = 'HEAD',
|
26
|
-
|
27
|
-
/** HTTP 请求 POST */
|
28
|
-
POST = 'POST',
|
29
|
-
|
30
|
-
/** HTTP 请求 PUT */
|
31
|
-
PUT = 'PUT',
|
32
|
-
|
33
|
-
/** HTTP 请求 DELETE */
|
34
|
-
DELETE = 'DELETE',
|
35
|
-
|
36
|
-
/** HTTP 请求 TRACE */
|
37
|
-
TRACE = 'TRACE',
|
38
|
-
|
39
|
-
/** HTTP 请求 TRACE */
|
40
|
-
CONNECT = 'CONNECT',
|
41
|
-
}
|
42
|
-
|
43
|
-
declare enum AccelerometerInterval {
|
44
|
-
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
45
|
-
game = 'game',
|
46
|
-
|
47
|
-
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
48
|
-
ui = 'ui',
|
49
|
-
|
50
|
-
/** 普通的回调频率,在 200ms/次 左右 */
|
51
|
-
normal = 'normal',
|
52
|
-
}
|
53
|
-
|
54
|
-
declare enum DeviceMotionInterval {
|
55
|
-
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
56
|
-
game = 'game',
|
57
|
-
|
58
|
-
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
59
|
-
ui = 'ui',
|
60
|
-
|
61
|
-
/** 普通的回调频率,在 200ms/次 左右 */
|
62
|
-
normal = 'normal',
|
63
|
-
}
|
64
|
-
|
65
|
-
declare enum GyroscopeInterval {
|
66
|
-
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
67
|
-
game = 'game',
|
68
|
-
|
69
|
-
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
70
|
-
ui = 'ui',
|
71
|
-
|
72
|
-
/** 普通的回调频率,在 200ms/次 左右 */
|
73
|
-
normal = 'normal',
|
74
|
-
}
|
75
|
-
|
76
|
-
declare enum Themes {
|
77
|
-
dark = 'dark',
|
78
|
-
|
79
|
-
light = 'light',
|
80
|
-
}
|
81
|
-
|
82
|
-
declare enum Orientation {
|
83
|
-
portrait = 'portrait',
|
84
|
-
|
85
|
-
landscape = 'landscape',
|
86
|
-
}
|
87
|
-
|
88
1
|
/**
|
89
2
|
* BaseKit
|
90
3
|
*
|
91
|
-
* @version 3.
|
4
|
+
* @version 3.11.0
|
92
5
|
*/
|
93
6
|
declare namespace ty {
|
94
7
|
/**
|
@@ -97,7 +10,7 @@ declare namespace ty {
|
|
97
10
|
export function stopAccelerometer(params?: {
|
98
11
|
complete?: () => void
|
99
12
|
success?: (params: null) => void
|
100
|
-
|
13
|
+
fail?: (params: {
|
101
14
|
errorMsg: string
|
102
15
|
errorCode: string | number
|
103
16
|
innerError: {
|
@@ -112,10 +25,10 @@ declare namespace ty {
|
|
112
25
|
*/
|
113
26
|
export function startAccelerometer(params?: {
|
114
27
|
/** 监听加速度数据回调函数的执行频率 */
|
115
|
-
interval?:
|
28
|
+
interval?: AccelerometerInterval
|
116
29
|
complete?: () => void
|
117
30
|
success?: (params: null) => void
|
118
|
-
|
31
|
+
fail?: (params: {
|
119
32
|
errorMsg: string
|
120
33
|
errorCode: string | number
|
121
34
|
innerError: {
|
@@ -238,7 +151,7 @@ declare namespace ty {
|
|
238
151
|
export function startCompass(params?: {
|
239
152
|
complete?: () => void
|
240
153
|
success?: (params: null) => void
|
241
|
-
|
154
|
+
fail?: (params: {
|
242
155
|
errorMsg: string
|
243
156
|
errorCode: string | number
|
244
157
|
innerError: {
|
@@ -254,7 +167,7 @@ declare namespace ty {
|
|
254
167
|
export function stopCompass(params?: {
|
255
168
|
complete?: () => void
|
256
169
|
success?: (params: null) => void
|
257
|
-
|
170
|
+
fail?: (params: {
|
258
171
|
errorMsg: string
|
259
172
|
errorCode: string | number
|
260
173
|
innerError: {
|
@@ -269,10 +182,10 @@ declare namespace ty {
|
|
269
182
|
*/
|
270
183
|
export function startDeviceMotionListening(params?: {
|
271
184
|
/** 监听加速度数据回调函数的执行频率 */
|
272
|
-
interval?:
|
185
|
+
interval?: DeviceMotionInterval
|
273
186
|
complete?: () => void
|
274
187
|
success?: (params: null) => void
|
275
|
-
|
188
|
+
fail?: (params: {
|
276
189
|
errorMsg: string
|
277
190
|
errorCode: string | number
|
278
191
|
innerError: {
|
@@ -288,7 +201,7 @@ declare namespace ty {
|
|
288
201
|
export function stopDeviceMotionListening(params?: {
|
289
202
|
complete?: () => void
|
290
203
|
success?: (params: null) => void
|
291
|
-
|
204
|
+
fail?: (params: {
|
292
205
|
errorMsg: string
|
293
206
|
errorCode: string | number
|
294
207
|
innerError: {
|
@@ -317,15 +230,37 @@ declare namespace ty {
|
|
317
230
|
}) => void
|
318
231
|
}): void
|
319
232
|
|
233
|
+
/**
|
234
|
+
* 写日志文件,需要APP配套使用检测设备网络功能进行日志上传查看。
|
235
|
+
*/
|
236
|
+
export function writeLogFile(params: {
|
237
|
+
/** 标识信息,传入devId或groupId */
|
238
|
+
resId: string
|
239
|
+
/** 要写入的文本数据, 使用utf8编码 */
|
240
|
+
data: string
|
241
|
+
/** 内容添加形式,true为追加在文件尾部,false为覆写文件 */
|
242
|
+
append?: boolean
|
243
|
+
complete?: () => void
|
244
|
+
success?: (params: null) => void
|
245
|
+
fail?: (params: {
|
246
|
+
errorMsg: string
|
247
|
+
errorCode: string | number
|
248
|
+
innerError: {
|
249
|
+
errorCode: string | number
|
250
|
+
errorMsg: string
|
251
|
+
}
|
252
|
+
}) => void
|
253
|
+
}): void
|
254
|
+
|
320
255
|
/**
|
321
256
|
* 开始监听陀螺仪数据。
|
322
257
|
*/
|
323
258
|
export function startGyroscope(params?: {
|
324
259
|
/** 监听陀螺仪数据回调函数的执行频率 */
|
325
|
-
interval?:
|
260
|
+
interval?: GyroscopeInterval
|
326
261
|
complete?: () => void
|
327
262
|
success?: (params: null) => void
|
328
|
-
|
263
|
+
fail?: (params: {
|
329
264
|
errorMsg: string
|
330
265
|
errorCode: string | number
|
331
266
|
innerError: {
|
@@ -341,7 +276,7 @@ declare namespace ty {
|
|
341
276
|
export function stopGyroscope(params?: {
|
342
277
|
complete?: () => void
|
343
278
|
success?: (params: null) => void
|
344
|
-
|
279
|
+
fail?: (params: {
|
345
280
|
errorMsg: string
|
346
281
|
errorCode: string | number
|
347
282
|
innerError: {
|
@@ -578,6 +513,24 @@ declare namespace ty {
|
|
578
513
|
}) => void
|
579
514
|
}): void
|
580
515
|
|
516
|
+
/**
|
517
|
+
* 保存图片到系统相册
|
518
|
+
*/
|
519
|
+
export function saveImageToPhotosAlbum(params: {
|
520
|
+
/** 图片文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) */
|
521
|
+
filePath: string
|
522
|
+
complete?: () => void
|
523
|
+
success?: (params: null) => void
|
524
|
+
fail?: (params: {
|
525
|
+
errorMsg: string
|
526
|
+
errorCode: string | number
|
527
|
+
innerError: {
|
528
|
+
errorCode: string | number
|
529
|
+
errorMsg: string
|
530
|
+
}
|
531
|
+
}) => void
|
532
|
+
}): void
|
533
|
+
|
581
534
|
/**
|
582
535
|
* 显示消息提示框
|
583
536
|
*/
|
@@ -669,6 +622,8 @@ declare namespace ty {
|
|
669
622
|
itemList: string[]
|
670
623
|
/** 按钮的文字颜色 */
|
671
624
|
itemColor?: string
|
625
|
+
/** 按钮的文字颜色 */
|
626
|
+
itemColors?: string[]
|
672
627
|
complete?: () => void
|
673
628
|
success?: (params: {
|
674
629
|
/** 用户点击的按钮序号,从上到下的顺序,从0开始 */
|
@@ -999,10 +954,18 @@ declare namespace ty {
|
|
999
954
|
bluetoothEnabled: boolean
|
1000
955
|
locationEnabled: boolean
|
1001
956
|
wifiEnabled: boolean
|
1002
|
-
theme?:
|
1003
|
-
deviceOrientation?:
|
957
|
+
theme?: Themes
|
958
|
+
deviceOrientation?: Orientation
|
1004
959
|
/** 设备等级(低:low-中:middle-高:high) */
|
1005
960
|
deviceLevel: string
|
961
|
+
/** 手机系统是否支持创建快捷方式(仅Android使用) */
|
962
|
+
isSupportPinShortcut?: boolean
|
963
|
+
/**
|
964
|
+
* 设备类型
|
965
|
+
* phone:手机
|
966
|
+
* pad:平板
|
967
|
+
*/
|
968
|
+
deviceType?: string
|
1006
969
|
}) => void
|
1007
970
|
fail?: (params: {
|
1008
971
|
errorMsg: string
|
@@ -1047,10 +1010,18 @@ declare namespace ty {
|
|
1047
1010
|
bluetoothEnabled: boolean
|
1048
1011
|
locationEnabled: boolean
|
1049
1012
|
wifiEnabled: boolean
|
1050
|
-
theme?:
|
1051
|
-
deviceOrientation?:
|
1013
|
+
theme?: Themes
|
1014
|
+
deviceOrientation?: Orientation
|
1052
1015
|
/** 设备等级(低:low-中:middle-高:high) */
|
1053
1016
|
deviceLevel: string
|
1017
|
+
/** 手机系统是否支持创建快捷方式(仅Android使用) */
|
1018
|
+
isSupportPinShortcut?: boolean
|
1019
|
+
/**
|
1020
|
+
* 设备类型
|
1021
|
+
* phone:手机
|
1022
|
+
* pad:平板
|
1023
|
+
*/
|
1024
|
+
deviceType?: string
|
1054
1025
|
}
|
1055
1026
|
|
1056
1027
|
/**
|
@@ -1368,6 +1339,36 @@ declare namespace ty {
|
|
1368
1339
|
*/
|
1369
1340
|
export function clearStorageSync(): null
|
1370
1341
|
|
1342
|
+
/**
|
1343
|
+
* onKeyboardHeightChange 发送键盘事件给js
|
1344
|
+
*/
|
1345
|
+
export function onKeyboardHeightChange(listener: (params: BeanRes) => void): void
|
1346
|
+
|
1347
|
+
/**
|
1348
|
+
* 取消监听:onKeyboardHeightChange 发送键盘事件给js
|
1349
|
+
*/
|
1350
|
+
export function offKeyboardHeightChange(listener: (params: BeanRes) => void): void
|
1351
|
+
|
1352
|
+
/**
|
1353
|
+
* 键盘弹出
|
1354
|
+
*/
|
1355
|
+
export function onKeyboardWillShow(listener: (params: BeanRes) => void): void
|
1356
|
+
|
1357
|
+
/**
|
1358
|
+
* 取消监听:键盘弹出
|
1359
|
+
*/
|
1360
|
+
export function offKeyboardWillShow(listener: (params: BeanRes) => void): void
|
1361
|
+
|
1362
|
+
/**
|
1363
|
+
* 键盘消息
|
1364
|
+
*/
|
1365
|
+
export function onKeyboardWillHide(listener: (params: BeanRes) => void): void
|
1366
|
+
|
1367
|
+
/**
|
1368
|
+
* 取消监听:键盘消息
|
1369
|
+
*/
|
1370
|
+
export function offKeyboardWillHide(listener: (params: BeanRes) => void): void
|
1371
|
+
|
1371
1372
|
/**
|
1372
1373
|
* 系统音量监听通知事件
|
1373
1374
|
*
|
@@ -1593,6 +1594,25 @@ declare namespace ty {
|
|
1593
1594
|
}) => void
|
1594
1595
|
): void
|
1595
1596
|
|
1597
|
+
export enum WidgetVersionType {
|
1598
|
+
/** 线上版本 */
|
1599
|
+
release = 'release',
|
1600
|
+
|
1601
|
+
/** 预发版本 */
|
1602
|
+
preview = 'preview',
|
1603
|
+
}
|
1604
|
+
|
1605
|
+
export enum WidgetPosition {
|
1606
|
+
/** 居底展示 */
|
1607
|
+
bottom = 'bottom',
|
1608
|
+
|
1609
|
+
/** 居顶展示 */
|
1610
|
+
top = 'top',
|
1611
|
+
|
1612
|
+
/** 居中展示 */
|
1613
|
+
center = 'center',
|
1614
|
+
}
|
1615
|
+
|
1596
1616
|
export type Profile = {
|
1597
1617
|
/** 第一个 HTTP 重定向发生时的时间。有跳转且是同域名内的重定向才算,否则值为 0 */
|
1598
1618
|
redirectStart: number
|
@@ -1731,6 +1751,65 @@ declare namespace ty {
|
|
1731
1751
|
encoding?: string
|
1732
1752
|
}
|
1733
1753
|
|
1754
|
+
export enum HTTPMethod {
|
1755
|
+
/** HTTP 请求 OPTIONS */
|
1756
|
+
OPTIONS = 'OPTIONS',
|
1757
|
+
|
1758
|
+
/** HTTP 请求 GET */
|
1759
|
+
GET = 'GET',
|
1760
|
+
|
1761
|
+
/** HTTP 请求 HEAD */
|
1762
|
+
HEAD = 'HEAD',
|
1763
|
+
|
1764
|
+
/** HTTP 请求 POST */
|
1765
|
+
POST = 'POST',
|
1766
|
+
|
1767
|
+
/** HTTP 请求 PUT */
|
1768
|
+
PUT = 'PUT',
|
1769
|
+
|
1770
|
+
/** HTTP 请求 DELETE */
|
1771
|
+
DELETE = 'DELETE',
|
1772
|
+
|
1773
|
+
/** HTTP 请求 TRACE */
|
1774
|
+
TRACE = 'TRACE',
|
1775
|
+
|
1776
|
+
/** HTTP 请求 TRACE */
|
1777
|
+
CONNECT = 'CONNECT',
|
1778
|
+
}
|
1779
|
+
|
1780
|
+
export enum AccelerometerInterval {
|
1781
|
+
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
1782
|
+
game = 'game',
|
1783
|
+
|
1784
|
+
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
1785
|
+
ui = 'ui',
|
1786
|
+
|
1787
|
+
/** 普通的回调频率,在 200ms/次 左右 */
|
1788
|
+
normal = 'normal',
|
1789
|
+
}
|
1790
|
+
|
1791
|
+
export enum DeviceMotionInterval {
|
1792
|
+
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
1793
|
+
game = 'game',
|
1794
|
+
|
1795
|
+
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
1796
|
+
ui = 'ui',
|
1797
|
+
|
1798
|
+
/** 普通的回调频率,在 200ms/次 左右 */
|
1799
|
+
normal = 'normal',
|
1800
|
+
}
|
1801
|
+
|
1802
|
+
export enum GyroscopeInterval {
|
1803
|
+
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
1804
|
+
game = 'game',
|
1805
|
+
|
1806
|
+
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
1807
|
+
ui = 'ui',
|
1808
|
+
|
1809
|
+
/** 普通的回调频率,在 200ms/次 左右 */
|
1810
|
+
normal = 'normal',
|
1811
|
+
}
|
1812
|
+
|
1734
1813
|
export type TempFileCB = {
|
1735
1814
|
/** 本地临时文件路径 (本地路径) */
|
1736
1815
|
path: string
|
@@ -1768,6 +1847,18 @@ declare namespace ty {
|
|
1768
1847
|
height: number
|
1769
1848
|
}
|
1770
1849
|
|
1850
|
+
export enum Themes {
|
1851
|
+
dark = 'dark',
|
1852
|
+
|
1853
|
+
light = 'light',
|
1854
|
+
}
|
1855
|
+
|
1856
|
+
export enum Orientation {
|
1857
|
+
portrait = 'portrait',
|
1858
|
+
|
1859
|
+
landscape = 'landscape',
|
1860
|
+
}
|
1861
|
+
|
1771
1862
|
export type StorageDataBean = {
|
1772
1863
|
/** 本地缓存中指定的 key */
|
1773
1864
|
key: string
|
@@ -1780,6 +1871,11 @@ declare namespace ty {
|
|
1780
1871
|
key: string
|
1781
1872
|
}
|
1782
1873
|
|
1874
|
+
export type BeanRes = {
|
1875
|
+
/** 键盘高度 */
|
1876
|
+
height: number
|
1877
|
+
}
|
1878
|
+
|
1783
1879
|
export type CurrentVolumeResponse = {
|
1784
1880
|
/** 音量,阈值【0 - 1】 */
|
1785
1881
|
value: number
|
@@ -1891,11 +1987,11 @@ declare namespace ty {
|
|
1891
1987
|
/** 小部件样式,默认middle */
|
1892
1988
|
style?: string
|
1893
1989
|
/** 版本类型,默认release */
|
1894
|
-
versionType?:
|
1990
|
+
versionType?: WidgetVersionType
|
1895
1991
|
/** 版本号 */
|
1896
1992
|
version?: string
|
1897
1993
|
/** 展示位置,默认bottom */
|
1898
|
-
position?:
|
1994
|
+
position?: WidgetPosition
|
1899
1995
|
/** 点击空白处是否关闭 */
|
1900
1996
|
autoDismiss?: boolean
|
1901
1997
|
/**
|
@@ -1914,7 +2010,7 @@ declare namespace ty {
|
|
1914
2010
|
|
1915
2011
|
export type DeviceMotionBean = {
|
1916
2012
|
/** 监听加速度数据回调函数的执行频率 */
|
1917
|
-
interval?:
|
2013
|
+
interval?: DeviceMotionInterval
|
1918
2014
|
}
|
1919
2015
|
|
1920
2016
|
export type DownLoadBean = {
|
@@ -1978,9 +2074,18 @@ declare namespace ty {
|
|
1978
2074
|
filePath: string
|
1979
2075
|
}
|
1980
2076
|
|
2077
|
+
export type LogFileParams = {
|
2078
|
+
/** 标识信息,传入devId或groupId */
|
2079
|
+
resId: string
|
2080
|
+
/** 要写入的文本数据, 使用utf8编码 */
|
2081
|
+
data: string
|
2082
|
+
/** 内容添加形式,true为追加在文件尾部,false为覆写文件 */
|
2083
|
+
append?: boolean
|
2084
|
+
}
|
2085
|
+
|
1981
2086
|
export type GyroscopeBean = {
|
1982
2087
|
/** 监听陀螺仪数据回调函数的执行频率 */
|
1983
|
-
interval?:
|
2088
|
+
interval?: GyroscopeInterval
|
1984
2089
|
}
|
1985
2090
|
|
1986
2091
|
export type ChooseImageBean = {
|
@@ -2124,6 +2229,11 @@ declare namespace ty {
|
|
2124
2229
|
filePath: string
|
2125
2230
|
}
|
2126
2231
|
|
2232
|
+
export type SaveImageParams = {
|
2233
|
+
/** 图片文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) */
|
2234
|
+
filePath: string
|
2235
|
+
}
|
2236
|
+
|
2127
2237
|
export type ToastBean = {
|
2128
2238
|
/** 提示的内容 */
|
2129
2239
|
title: string
|
@@ -2175,6 +2285,8 @@ declare namespace ty {
|
|
2175
2285
|
itemList: string[]
|
2176
2286
|
/** 按钮的文字颜色 */
|
2177
2287
|
itemColor?: string
|
2288
|
+
/** 按钮的文字颜色 */
|
2289
|
+
itemColors?: string[]
|
2178
2290
|
}
|
2179
2291
|
|
2180
2292
|
export type ActionSheetCallback = {
|
@@ -2194,7 +2306,7 @@ declare namespace ty {
|
|
2194
2306
|
/** 超时时间,单位为毫秒 */
|
2195
2307
|
timeout?: number
|
2196
2308
|
/** HTTP 请求方法 */
|
2197
|
-
method?:
|
2309
|
+
method?: HTTPMethod
|
2198
2310
|
/** 返回的数据格式 */
|
2199
2311
|
dataType?: any
|
2200
2312
|
/** 返回的数据类型 */
|
@@ -2348,10 +2460,18 @@ declare namespace ty {
|
|
2348
2460
|
bluetoothEnabled: boolean
|
2349
2461
|
locationEnabled: boolean
|
2350
2462
|
wifiEnabled: boolean
|
2351
|
-
theme?:
|
2352
|
-
deviceOrientation?:
|
2463
|
+
theme?: Themes
|
2464
|
+
deviceOrientation?: Orientation
|
2353
2465
|
/** 设备等级(低:low-中:middle-高:high) */
|
2354
2466
|
deviceLevel: string
|
2467
|
+
/** 手机系统是否支持创建快捷方式(仅Android使用) */
|
2468
|
+
isSupportPinShortcut?: boolean
|
2469
|
+
/**
|
2470
|
+
* 设备类型
|
2471
|
+
* phone:手机
|
2472
|
+
* pad:平板
|
2473
|
+
*/
|
2474
|
+
deviceType?: string
|
2355
2475
|
}
|
2356
2476
|
|
2357
2477
|
export type GetConnectedWifiParams = {
|
@@ -2668,11 +2788,11 @@ declare namespace ty {
|
|
2668
2788
|
/** 小部件样式,默认middle */
|
2669
2789
|
style?: string
|
2670
2790
|
/** 版本类型,默认release */
|
2671
|
-
versionType?:
|
2791
|
+
versionType?: WidgetVersionType
|
2672
2792
|
/** 版本号 */
|
2673
2793
|
version?: string
|
2674
2794
|
/** 展示位置,默认bottom */
|
2675
|
-
position?:
|
2795
|
+
position?: WidgetPosition
|
2676
2796
|
/** 点击空白处是否关闭 */
|
2677
2797
|
autoDismiss?: boolean
|
2678
2798
|
/**
|
@@ -2704,7 +2824,7 @@ declare namespace ty {
|
|
2704
2824
|
abort(params: {
|
2705
2825
|
complete?: () => void
|
2706
2826
|
success?: (params: null) => void
|
2707
|
-
|
2827
|
+
fail?: (params: {
|
2708
2828
|
errorMsg: string
|
2709
2829
|
errorCode: string | number
|
2710
2830
|
innerError: {
|
@@ -2790,7 +2910,7 @@ declare namespace ty {
|
|
2790
2910
|
/** 网络请求过程中一些调试信息 */
|
2791
2911
|
profile: Profile
|
2792
2912
|
}) => void
|
2793
|
-
|
2913
|
+
fail?: (params: {
|
2794
2914
|
errorMsg: string
|
2795
2915
|
errorCode: string | number
|
2796
2916
|
innerError: {
|
@@ -3051,7 +3171,7 @@ declare namespace ty {
|
|
3051
3171
|
abort(params: {
|
3052
3172
|
complete?: () => void
|
3053
3173
|
success?: (params: null) => void
|
3054
|
-
|
3174
|
+
fail?: (params: {
|
3055
3175
|
errorMsg: string
|
3056
3176
|
errorCode: string | number
|
3057
3177
|
innerError: {
|
@@ -3095,7 +3215,7 @@ declare namespace ty {
|
|
3095
3215
|
/** 超时时间,单位为毫秒 */
|
3096
3216
|
timeout?: number
|
3097
3217
|
/** HTTP 请求方法 */
|
3098
|
-
method?:
|
3218
|
+
method?: HTTPMethod
|
3099
3219
|
/** 返回的数据格式 */
|
3100
3220
|
dataType?: any
|
3101
3221
|
/** 返回的数据类型 */
|
@@ -3121,7 +3241,7 @@ declare namespace ty {
|
|
3121
3241
|
/** 网络请求id,用户取消、监听等操作 */
|
3122
3242
|
taskId: string
|
3123
3243
|
}) => void
|
3124
|
-
|
3244
|
+
fail?: (params: {
|
3125
3245
|
errorMsg: string
|
3126
3246
|
errorCode: string | number
|
3127
3247
|
innerError: {
|
@@ -3158,7 +3278,7 @@ declare namespace ty {
|
|
3158
3278
|
/** 录音文件的临时路径 (本地路径) */
|
3159
3279
|
tempFilePath: string
|
3160
3280
|
}) => void
|
3161
|
-
|
3281
|
+
fail?: (params: {
|
3162
3282
|
errorMsg: string
|
3163
3283
|
errorCode: string | number
|
3164
3284
|
innerError: {
|
@@ -3177,7 +3297,7 @@ declare namespace ty {
|
|
3177
3297
|
/** 录音文件的临时路径 (本地路径) */
|
3178
3298
|
tempFilePath: string
|
3179
3299
|
}) => void
|
3180
|
-
|
3300
|
+
fail?: (params: {
|
3181
3301
|
errorMsg: string
|
3182
3302
|
errorCode: string | number
|
3183
3303
|
innerError: {
|
@@ -3196,7 +3316,7 @@ declare namespace ty {
|
|
3196
3316
|
/** 录音文件的临时路径 (本地路径) */
|
3197
3317
|
tempFilePath: string
|
3198
3318
|
}) => void
|
3199
|
-
|
3319
|
+
fail?: (params: {
|
3200
3320
|
errorMsg: string
|
3201
3321
|
errorCode: string | number
|
3202
3322
|
innerError: {
|
@@ -3215,7 +3335,7 @@ declare namespace ty {
|
|
3215
3335
|
/** 录音文件的临时路径 (本地路径) */
|
3216
3336
|
tempFilePath: string
|
3217
3337
|
}) => void
|
3218
|
-
|
3338
|
+
fail?: (params: {
|
3219
3339
|
errorMsg: string
|
3220
3340
|
errorCode: string | number
|
3221
3341
|
innerError: {
|
@@ -3233,7 +3353,7 @@ declare namespace ty {
|
|
3233
3353
|
period: number
|
3234
3354
|
complete?: () => void
|
3235
3355
|
success?: (params: null) => void
|
3236
|
-
|
3356
|
+
fail?: (params: {
|
3237
3357
|
errorMsg: string
|
3238
3358
|
errorCode: string | number
|
3239
3359
|
innerError: {
|
@@ -3249,7 +3369,7 @@ declare namespace ty {
|
|
3249
3369
|
stopRecording(params: {
|
3250
3370
|
complete?: () => void
|
3251
3371
|
success?: (params: null) => void
|
3252
|
-
|
3372
|
+
fail?: (params: {
|
3253
3373
|
errorMsg: string
|
3254
3374
|
errorCode: string | number
|
3255
3375
|
innerError: {
|
@@ -3262,7 +3382,7 @@ declare namespace ty {
|
|
3262
3382
|
export function getRecorderManager(params?: {
|
3263
3383
|
complete?: () => void
|
3264
3384
|
success?: (params: null) => void
|
3265
|
-
|
3385
|
+
fail?: (params: {
|
3266
3386
|
errorMsg: string
|
3267
3387
|
errorCode: string | number
|
3268
3388
|
innerError: {
|
@@ -3282,7 +3402,7 @@ declare namespace ty {
|
|
3282
3402
|
abort(params: {
|
3283
3403
|
complete?: () => void
|
3284
3404
|
success?: (params: null) => void
|
3285
|
-
|
3405
|
+
fail?: (params: {
|
3286
3406
|
errorMsg: string
|
3287
3407
|
errorCode: string | number
|
3288
3408
|
innerError: {
|
@@ -3368,7 +3488,7 @@ declare namespace ty {
|
|
3368
3488
|
/** 开发者服务器返回的 HTTP 状态码 */
|
3369
3489
|
statusCode: number
|
3370
3490
|
}) => void
|
3371
|
-
|
3491
|
+
fail?: (params: {
|
3372
3492
|
errorMsg: string
|
3373
3493
|
errorCode: string | number
|
3374
3494
|
innerError: {
|