@ray-js/api 1.7.80 → 1.7.82
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/AIKit.d.ts +2296 -1291
- package/@types/AIStreamKit.d.ts +687 -444
- package/@types/AVideoKit.d.ts +148 -62
- package/@types/BaseKit.d.ts +3881 -333
- package/@types/BizKit.d.ts +2450 -325
- package/@types/CategoryCommonBizKit.d.ts +17 -17
- package/@types/DeviceKit.d.ts +2334 -331
- package/@types/HealthKit.d.ts +479 -299
- package/@types/HomeKit.d.ts +2026 -1093
- package/@types/IPCKit.d.ts +1838 -103
- package/@types/LightKit.d.ts +38 -2
- package/@types/MapKit.d.ts +780 -600
- package/@types/MediaKit.d.ts +34 -28
- package/@types/MediaPlayerKit.d.ts +28 -4
- package/@types/MiniKit.d.ts +1320 -230
- package/@types/OutdoorKit.d.ts +1966 -64
- package/@types/P2PKit.d.ts +461 -150
- package/@types/PayKit.d.ts +79 -10
- package/@types/PlayNetKit.d.ts +1542 -158
- package/@types/ThirdAuthKit.d.ts +252 -28
- package/@types/ThirdPartyDeviceKit.d.ts +2 -2
- package/@types/WearKit.d.ts +1706 -661
- package/lib/WearKit-3.1.0.d.ts +426 -0
- package/lib/WearKit-3.1.0.js +599 -0
- package/lib/all-kits.d.ts +1 -1
- package/lib/all-kits.js +1 -1
- package/package.json +5 -5
- package/lib/WearKit-1.1.6.d.ts +0 -126
- package/lib/WearKit-1.1.6.js +0 -180
package/@types/OutdoorKit.d.ts
CHANGED
|
@@ -1,13 +1,1127 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OutdoorKit
|
|
3
3
|
*
|
|
4
|
-
* @version
|
|
4
|
+
* @version 7.8.5
|
|
5
5
|
*/
|
|
6
6
|
declare namespace ty.outdoor {
|
|
7
|
+
/**
|
|
8
|
+
* 一键连接设备(WiFi 热点连接 + SDK 初始化 + 心跳保活)
|
|
9
|
+
* @public
|
|
10
|
+
* @since OutdoorKit 7.8.0
|
|
11
|
+
* @example Demo
|
|
12
|
+
* ```tsx
|
|
13
|
+
* ty.outdoor.connectDevice({
|
|
14
|
+
* ssid: "xx",
|
|
15
|
+
* password: "xx",
|
|
16
|
+
* success: data => {
|
|
17
|
+
* console.log(data);
|
|
18
|
+
* },
|
|
19
|
+
* fail: error => {
|
|
20
|
+
* console.error(error);
|
|
21
|
+
* },
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
* @platform iOS Android
|
|
25
|
+
*/
|
|
26
|
+
export function connectDevice(params: {
|
|
27
|
+
/**
|
|
28
|
+
* 设备热点 SSID
|
|
29
|
+
* @since OutdoorKit 7.8.0
|
|
30
|
+
*/
|
|
31
|
+
ssid: string
|
|
32
|
+
/**
|
|
33
|
+
* 设备热点密码
|
|
34
|
+
* @since OutdoorKit 7.8.0
|
|
35
|
+
*/
|
|
36
|
+
password: string
|
|
37
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
38
|
+
complete?: () => void
|
|
39
|
+
/** 接口调用成功的回调函数 */
|
|
40
|
+
success?: () => void
|
|
41
|
+
/** 接口调用失败的回调函数 */
|
|
42
|
+
fail?: (params: {
|
|
43
|
+
/** 错误信息 */
|
|
44
|
+
errorMsg: string
|
|
45
|
+
/** 错误码 */
|
|
46
|
+
errorCode: string | number
|
|
47
|
+
/** 错误扩展 */
|
|
48
|
+
innerError: {
|
|
49
|
+
/** 错误扩展码 */
|
|
50
|
+
errorCode: string | number
|
|
51
|
+
/** 错误扩展信息 */
|
|
52
|
+
errorMsg: string
|
|
53
|
+
}
|
|
54
|
+
}) => void
|
|
55
|
+
}): void
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 初始化 RideSafe SDK
|
|
59
|
+
* @public
|
|
60
|
+
* @since OutdoorKit 7.8.0
|
|
61
|
+
* @example Demo
|
|
62
|
+
* ```tsx
|
|
63
|
+
* ty.outdoor.initSDK({
|
|
64
|
+
* keyPath: "xx",
|
|
65
|
+
* loggerDir: "xx",
|
|
66
|
+
* success: data => {
|
|
67
|
+
* console.log(data);
|
|
68
|
+
* },
|
|
69
|
+
* fail: error => {
|
|
70
|
+
* console.error(error);
|
|
71
|
+
* },
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
* @platform iOS Android
|
|
75
|
+
*/
|
|
76
|
+
export function initSDK(params: {
|
|
77
|
+
/**
|
|
78
|
+
* 密钥文件路径
|
|
79
|
+
* @since OutdoorKit 7.8.0
|
|
80
|
+
*/
|
|
81
|
+
keyPath: string
|
|
82
|
+
/**
|
|
83
|
+
* 日志输出目录
|
|
84
|
+
* @since OutdoorKit 7.8.0
|
|
85
|
+
*/
|
|
86
|
+
loggerDir: string
|
|
87
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
88
|
+
complete?: () => void
|
|
89
|
+
/** 接口调用成功的回调函数 */
|
|
90
|
+
success?: () => void
|
|
91
|
+
/** 接口调用失败的回调函数 */
|
|
92
|
+
fail?: (params: {
|
|
93
|
+
/** 错误信息 */
|
|
94
|
+
errorMsg: string
|
|
95
|
+
/** 错误码 */
|
|
96
|
+
errorCode: string | number
|
|
97
|
+
/** 错误扩展 */
|
|
98
|
+
innerError: {
|
|
99
|
+
/** 错误扩展码 */
|
|
100
|
+
errorCode: string | number
|
|
101
|
+
/** 错误扩展信息 */
|
|
102
|
+
errorMsg: string
|
|
103
|
+
}
|
|
104
|
+
}) => void
|
|
105
|
+
}): void
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 销毁 RideSafe SDK
|
|
109
|
+
* @public
|
|
110
|
+
* @since OutdoorKit 7.8.0
|
|
111
|
+
* @example Demo
|
|
112
|
+
* ```tsx
|
|
113
|
+
* ty.outdoor.destroySDK({
|
|
114
|
+
* success: data => {
|
|
115
|
+
* console.log(data);
|
|
116
|
+
* },
|
|
117
|
+
* fail: error => {
|
|
118
|
+
* console.error(error);
|
|
119
|
+
* },
|
|
120
|
+
* });
|
|
121
|
+
* ```
|
|
122
|
+
* @platform iOS Android
|
|
123
|
+
*/
|
|
124
|
+
export function destroySDK(params?: {
|
|
125
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
126
|
+
complete?: () => void
|
|
127
|
+
/** 接口调用成功的回调函数 */
|
|
128
|
+
success?: () => void
|
|
129
|
+
/** 接口调用失败的回调函数 */
|
|
130
|
+
fail?: (params: {
|
|
131
|
+
/** 错误信息 */
|
|
132
|
+
errorMsg: string
|
|
133
|
+
/** 错误码 */
|
|
134
|
+
errorCode: string | number
|
|
135
|
+
/** 错误扩展 */
|
|
136
|
+
innerError: {
|
|
137
|
+
/** 错误扩展码 */
|
|
138
|
+
errorCode: string | number
|
|
139
|
+
/** 错误扩展信息 */
|
|
140
|
+
errorMsg: string
|
|
141
|
+
}
|
|
142
|
+
}) => void
|
|
143
|
+
}): void
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 获取摄像头信息
|
|
147
|
+
* @public
|
|
148
|
+
* @since OutdoorKit 7.8.0
|
|
149
|
+
* @example Demo
|
|
150
|
+
* ```tsx
|
|
151
|
+
* ty.outdoor.getCameraInfo({
|
|
152
|
+
* success: data => {
|
|
153
|
+
* console.log(data);
|
|
154
|
+
* },
|
|
155
|
+
* fail: error => {
|
|
156
|
+
* console.error(error);
|
|
157
|
+
* },
|
|
158
|
+
* });
|
|
159
|
+
* ```
|
|
160
|
+
* @platform iOS Android
|
|
161
|
+
*/
|
|
162
|
+
export function getCameraInfo(params?: {
|
|
163
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
164
|
+
complete?: () => void
|
|
165
|
+
/** 接口调用成功的回调函数 */
|
|
166
|
+
success?: (params: {
|
|
167
|
+
/**
|
|
168
|
+
* 设备序列号
|
|
169
|
+
* @since OutdoorKit 7.8.0
|
|
170
|
+
*/
|
|
171
|
+
sn: string
|
|
172
|
+
/**
|
|
173
|
+
* 产品编号
|
|
174
|
+
* @since OutdoorKit 7.8.0
|
|
175
|
+
*/
|
|
176
|
+
pn: string
|
|
177
|
+
/**
|
|
178
|
+
* SKU 编码
|
|
179
|
+
* @since OutdoorKit 7.8.0
|
|
180
|
+
*/
|
|
181
|
+
sku: string
|
|
182
|
+
/**
|
|
183
|
+
* 当前固件版本
|
|
184
|
+
* @since OutdoorKit 7.8.0
|
|
185
|
+
*/
|
|
186
|
+
firmwareVersion: string
|
|
187
|
+
/**
|
|
188
|
+
* 绑定状态:0=未绑定, 1=已绑定
|
|
189
|
+
* @since OutdoorKit 7.8.0
|
|
190
|
+
*/
|
|
191
|
+
isBind: number
|
|
192
|
+
/**
|
|
193
|
+
* 剩余存储空间(字节)
|
|
194
|
+
* @since OutdoorKit 7.8.0
|
|
195
|
+
*/
|
|
196
|
+
freeSpace: number
|
|
197
|
+
/**
|
|
198
|
+
* 总存储空间(字节)
|
|
199
|
+
* @since OutdoorKit 7.8.0
|
|
200
|
+
*/
|
|
201
|
+
totalSpace: number
|
|
202
|
+
/**
|
|
203
|
+
* 已用存储空间(字节)
|
|
204
|
+
* @since OutdoorKit 7.8.0
|
|
205
|
+
*/
|
|
206
|
+
usedSpace: number
|
|
207
|
+
/**
|
|
208
|
+
* RTSP 服务状态:0=关闭, 1=开启
|
|
209
|
+
* @since OutdoorKit 7.8.0
|
|
210
|
+
*/
|
|
211
|
+
rtspStatus: number
|
|
212
|
+
/**
|
|
213
|
+
* 当前帧率(单位 fps)
|
|
214
|
+
* @since OutdoorKit 7.8.0
|
|
215
|
+
*/
|
|
216
|
+
fps: number
|
|
217
|
+
/**
|
|
218
|
+
* 当前码率(单位 kbps)
|
|
219
|
+
* @since OutdoorKit 7.8.0
|
|
220
|
+
*/
|
|
221
|
+
bitRate: number
|
|
222
|
+
/**
|
|
223
|
+
* 当前录制分段间隔(单位:秒)
|
|
224
|
+
* @since OutdoorKit 7.8.0
|
|
225
|
+
*/
|
|
226
|
+
recordInterval: number
|
|
227
|
+
/**
|
|
228
|
+
* AI 功能状态:0=关闭, 1=开启
|
|
229
|
+
* @since OutdoorKit 7.8.0
|
|
230
|
+
*/
|
|
231
|
+
aiEnabled: number
|
|
232
|
+
}) => void
|
|
233
|
+
/** 接口调用失败的回调函数 */
|
|
234
|
+
fail?: (params: {
|
|
235
|
+
/** 错误信息 */
|
|
236
|
+
errorMsg: string
|
|
237
|
+
/** 错误码 */
|
|
238
|
+
errorCode: string | number
|
|
239
|
+
/** 错误扩展 */
|
|
240
|
+
innerError: {
|
|
241
|
+
/** 错误扩展码 */
|
|
242
|
+
errorCode: string | number
|
|
243
|
+
/** 错误扩展信息 */
|
|
244
|
+
errorMsg: string
|
|
245
|
+
}
|
|
246
|
+
}) => void
|
|
247
|
+
}): void
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* 配置相机 WiFi
|
|
251
|
+
* @public
|
|
252
|
+
* @since OutdoorKit 7.8.0
|
|
253
|
+
* @example Demo
|
|
254
|
+
* ```tsx
|
|
255
|
+
* ty.outdoor.setWifi({
|
|
256
|
+
* ssid: "xx",
|
|
257
|
+
* password: "xx",
|
|
258
|
+
* success: data => {
|
|
259
|
+
* console.log(data);
|
|
260
|
+
* },
|
|
261
|
+
* fail: error => {
|
|
262
|
+
* console.error(error);
|
|
263
|
+
* },
|
|
264
|
+
* });
|
|
265
|
+
* ```
|
|
266
|
+
* @platform iOS Android
|
|
267
|
+
*/
|
|
268
|
+
export function setWifi(params: {
|
|
269
|
+
/**
|
|
270
|
+
* WiFi 名称
|
|
271
|
+
* @since OutdoorKit 7.8.0
|
|
272
|
+
*/
|
|
273
|
+
ssid: string
|
|
274
|
+
/**
|
|
275
|
+
* WiFi 密码
|
|
276
|
+
* @since OutdoorKit 7.8.0
|
|
277
|
+
*/
|
|
278
|
+
password: string
|
|
279
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
280
|
+
complete?: () => void
|
|
281
|
+
/** 接口调用成功的回调函数 */
|
|
282
|
+
success?: () => void
|
|
283
|
+
/** 接口调用失败的回调函数 */
|
|
284
|
+
fail?: (params: {
|
|
285
|
+
/** 错误信息 */
|
|
286
|
+
errorMsg: string
|
|
287
|
+
/** 错误码 */
|
|
288
|
+
errorCode: string | number
|
|
289
|
+
/** 错误扩展 */
|
|
290
|
+
innerError: {
|
|
291
|
+
/** 错误扩展码 */
|
|
292
|
+
errorCode: string | number
|
|
293
|
+
/** 错误扩展信息 */
|
|
294
|
+
errorMsg: string
|
|
295
|
+
}
|
|
296
|
+
}) => void
|
|
297
|
+
}): void
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* 设置帧率(25 或 30)
|
|
301
|
+
* @public
|
|
302
|
+
* @since OutdoorKit 7.8.0
|
|
303
|
+
* @example Demo
|
|
304
|
+
* ```tsx
|
|
305
|
+
* ty.outdoor.setFPS({
|
|
306
|
+
* fps: 30,
|
|
307
|
+
* success: data => {
|
|
308
|
+
* console.log(data);
|
|
309
|
+
* },
|
|
310
|
+
* fail: error => {
|
|
311
|
+
* console.error(error);
|
|
312
|
+
* },
|
|
313
|
+
* });
|
|
314
|
+
* ```
|
|
315
|
+
* @platform iOS Android
|
|
316
|
+
*/
|
|
317
|
+
export function setFPS(params: {
|
|
318
|
+
/**
|
|
319
|
+
* 帧率值,支持 25 或 30
|
|
320
|
+
* @since OutdoorKit 7.8.0
|
|
321
|
+
*/
|
|
322
|
+
fps: number
|
|
323
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
324
|
+
complete?: () => void
|
|
325
|
+
/** 接口调用成功的回调函数 */
|
|
326
|
+
success?: () => void
|
|
327
|
+
/** 接口调用失败的回调函数 */
|
|
328
|
+
fail?: (params: {
|
|
329
|
+
/** 错误信息 */
|
|
330
|
+
errorMsg: string
|
|
331
|
+
/** 错误码 */
|
|
332
|
+
errorCode: string | number
|
|
333
|
+
/** 错误扩展 */
|
|
334
|
+
innerError: {
|
|
335
|
+
/** 错误扩展码 */
|
|
336
|
+
errorCode: string | number
|
|
337
|
+
/** 错误扩展信息 */
|
|
338
|
+
errorMsg: string
|
|
339
|
+
}
|
|
340
|
+
}) => void
|
|
341
|
+
}): void
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* 获取帧率
|
|
345
|
+
* @public
|
|
346
|
+
* @since OutdoorKit 7.8.0
|
|
347
|
+
* @example Demo
|
|
348
|
+
* ```tsx
|
|
349
|
+
* ty.outdoor.getFPS({
|
|
350
|
+
* success: data => {
|
|
351
|
+
* console.log(data);
|
|
352
|
+
* },
|
|
353
|
+
* fail: error => {
|
|
354
|
+
* console.error(error);
|
|
355
|
+
* },
|
|
356
|
+
* });
|
|
357
|
+
* ```
|
|
358
|
+
* @platform iOS Android
|
|
359
|
+
*/
|
|
360
|
+
export function getFPS(params?: {
|
|
361
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
362
|
+
complete?: () => void
|
|
363
|
+
/** 接口调用成功的回调函数 */
|
|
364
|
+
success?: (params: {
|
|
365
|
+
/**
|
|
366
|
+
* 当前帧率(单位 fps,通常为 25 或 30)
|
|
367
|
+
* @since OutdoorKit 7.8.0
|
|
368
|
+
*/
|
|
369
|
+
fps: number
|
|
370
|
+
}) => void
|
|
371
|
+
/** 接口调用失败的回调函数 */
|
|
372
|
+
fail?: (params: {
|
|
373
|
+
/** 错误信息 */
|
|
374
|
+
errorMsg: string
|
|
375
|
+
/** 错误码 */
|
|
376
|
+
errorCode: string | number
|
|
377
|
+
/** 错误扩展 */
|
|
378
|
+
innerError: {
|
|
379
|
+
/** 错误扩展码 */
|
|
380
|
+
errorCode: string | number
|
|
381
|
+
/** 错误扩展信息 */
|
|
382
|
+
errorMsg: string
|
|
383
|
+
}
|
|
384
|
+
}) => void
|
|
385
|
+
}): void
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* 设置码率
|
|
389
|
+
* @public
|
|
390
|
+
* @since OutdoorKit 7.8.0
|
|
391
|
+
* @example Demo
|
|
392
|
+
* ```tsx
|
|
393
|
+
* ty.outdoor.setBitRate({
|
|
394
|
+
* bitRate: 1,
|
|
395
|
+
* success: data => {
|
|
396
|
+
* console.log(data);
|
|
397
|
+
* },
|
|
398
|
+
* fail: error => {
|
|
399
|
+
* console.error(error);
|
|
400
|
+
* },
|
|
401
|
+
* });
|
|
402
|
+
* ```
|
|
403
|
+
* @platform iOS Android
|
|
404
|
+
*/
|
|
405
|
+
export function setBitRate(params: {
|
|
406
|
+
/**
|
|
407
|
+
* 码率值(单位 kbps)
|
|
408
|
+
* @since OutdoorKit 7.8.0
|
|
409
|
+
*/
|
|
410
|
+
bitRate: number
|
|
411
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
412
|
+
complete?: () => void
|
|
413
|
+
/** 接口调用成功的回调函数 */
|
|
414
|
+
success?: () => void
|
|
415
|
+
/** 接口调用失败的回调函数 */
|
|
416
|
+
fail?: (params: {
|
|
417
|
+
/** 错误信息 */
|
|
418
|
+
errorMsg: string
|
|
419
|
+
/** 错误码 */
|
|
420
|
+
errorCode: string | number
|
|
421
|
+
/** 错误扩展 */
|
|
422
|
+
innerError: {
|
|
423
|
+
/** 错误扩展码 */
|
|
424
|
+
errorCode: string | number
|
|
425
|
+
/** 错误扩展信息 */
|
|
426
|
+
errorMsg: string
|
|
427
|
+
}
|
|
428
|
+
}) => void
|
|
429
|
+
}): void
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* 获取码率
|
|
433
|
+
* @public
|
|
434
|
+
* @since OutdoorKit 7.8.0
|
|
435
|
+
* @example Demo
|
|
436
|
+
* ```tsx
|
|
437
|
+
* ty.outdoor.getBitRate({
|
|
438
|
+
* success: data => {
|
|
439
|
+
* console.log(data);
|
|
440
|
+
* },
|
|
441
|
+
* fail: error => {
|
|
442
|
+
* console.error(error);
|
|
443
|
+
* },
|
|
444
|
+
* });
|
|
445
|
+
* ```
|
|
446
|
+
* @platform iOS Android
|
|
447
|
+
*/
|
|
448
|
+
export function getBitRate(params?: {
|
|
449
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
450
|
+
complete?: () => void
|
|
451
|
+
/** 接口调用成功的回调函数 */
|
|
452
|
+
success?: (params: {
|
|
453
|
+
/**
|
|
454
|
+
* 当前码率(单位 kbps)
|
|
455
|
+
* @since OutdoorKit 7.8.0
|
|
456
|
+
*/
|
|
457
|
+
bitRate: number
|
|
458
|
+
}) => void
|
|
459
|
+
/** 接口调用失败的回调函数 */
|
|
460
|
+
fail?: (params: {
|
|
461
|
+
/** 错误信息 */
|
|
462
|
+
errorMsg: string
|
|
463
|
+
/** 错误码 */
|
|
464
|
+
errorCode: string | number
|
|
465
|
+
/** 错误扩展 */
|
|
466
|
+
innerError: {
|
|
467
|
+
/** 错误扩展码 */
|
|
468
|
+
errorCode: string | number
|
|
469
|
+
/** 错误扩展信息 */
|
|
470
|
+
errorMsg: string
|
|
471
|
+
}
|
|
472
|
+
}) => void
|
|
473
|
+
}): void
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* 设置录制间隔(60/120/180/300 秒)
|
|
477
|
+
* @public
|
|
478
|
+
* @since OutdoorKit 7.8.0
|
|
479
|
+
* @example Demo
|
|
480
|
+
* ```tsx
|
|
481
|
+
* ty.outdoor.setRecordInterval({
|
|
482
|
+
* interval: 60,
|
|
483
|
+
* success: data => {
|
|
484
|
+
* console.log(data);
|
|
485
|
+
* },
|
|
486
|
+
* fail: error => {
|
|
487
|
+
* console.error(error);
|
|
488
|
+
* },
|
|
489
|
+
* });
|
|
490
|
+
* ```
|
|
491
|
+
* @platform iOS Android
|
|
492
|
+
*/
|
|
493
|
+
export function setRecordInterval(params: {
|
|
494
|
+
/**
|
|
495
|
+
* 录制间隔,支持 60/120/180/300(秒)
|
|
496
|
+
* @since OutdoorKit 7.8.0
|
|
497
|
+
*/
|
|
498
|
+
interval: number
|
|
499
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
500
|
+
complete?: () => void
|
|
501
|
+
/** 接口调用成功的回调函数 */
|
|
502
|
+
success?: () => void
|
|
503
|
+
/** 接口调用失败的回调函数 */
|
|
504
|
+
fail?: (params: {
|
|
505
|
+
/** 错误信息 */
|
|
506
|
+
errorMsg: string
|
|
507
|
+
/** 错误码 */
|
|
508
|
+
errorCode: string | number
|
|
509
|
+
/** 错误扩展 */
|
|
510
|
+
innerError: {
|
|
511
|
+
/** 错误扩展码 */
|
|
512
|
+
errorCode: string | number
|
|
513
|
+
/** 错误扩展信息 */
|
|
514
|
+
errorMsg: string
|
|
515
|
+
}
|
|
516
|
+
}) => void
|
|
517
|
+
}): void
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* 获取录制间隔
|
|
521
|
+
* @public
|
|
522
|
+
* @since OutdoorKit 7.8.0
|
|
523
|
+
* @example Demo
|
|
524
|
+
* ```tsx
|
|
525
|
+
* ty.outdoor.getRecordInterval({
|
|
526
|
+
* success: data => {
|
|
527
|
+
* console.log(data);
|
|
528
|
+
* },
|
|
529
|
+
* fail: error => {
|
|
530
|
+
* console.error(error);
|
|
531
|
+
* },
|
|
532
|
+
* });
|
|
533
|
+
* ```
|
|
534
|
+
* @platform iOS Android
|
|
535
|
+
*/
|
|
536
|
+
export function getRecordInterval(params?: {
|
|
537
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
538
|
+
complete?: () => void
|
|
539
|
+
/** 接口调用成功的回调函数 */
|
|
540
|
+
success?: (params: {
|
|
541
|
+
/**
|
|
542
|
+
* 当前录制间隔(秒)
|
|
543
|
+
* @since OutdoorKit 7.8.0
|
|
544
|
+
*/
|
|
545
|
+
interval: number
|
|
546
|
+
}) => void
|
|
547
|
+
/** 接口调用失败的回调函数 */
|
|
548
|
+
fail?: (params: {
|
|
549
|
+
/** 错误信息 */
|
|
550
|
+
errorMsg: string
|
|
551
|
+
/** 错误码 */
|
|
552
|
+
errorCode: string | number
|
|
553
|
+
/** 错误扩展 */
|
|
554
|
+
innerError: {
|
|
555
|
+
/** 错误扩展码 */
|
|
556
|
+
errorCode: string | number
|
|
557
|
+
/** 错误扩展信息 */
|
|
558
|
+
errorMsg: string
|
|
559
|
+
}
|
|
560
|
+
}) => void
|
|
561
|
+
}): void
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* 设置 AI 功能开关(0=关, 1=开)
|
|
565
|
+
* @public
|
|
566
|
+
* @since OutdoorKit 7.8.0
|
|
567
|
+
* @example Demo
|
|
568
|
+
* ```tsx
|
|
569
|
+
* ty.outdoor.setAIEnabled({
|
|
570
|
+
* enabled: 1,
|
|
571
|
+
* success: data => {
|
|
572
|
+
* console.log(data);
|
|
573
|
+
* },
|
|
574
|
+
* fail: error => {
|
|
575
|
+
* console.error(error);
|
|
576
|
+
* },
|
|
577
|
+
* });
|
|
578
|
+
* ```
|
|
579
|
+
* @platform iOS Android
|
|
580
|
+
*/
|
|
581
|
+
export function setAIEnabled(params: {
|
|
582
|
+
/**
|
|
583
|
+
* AI 功能开关:0=关闭, 1=开启
|
|
584
|
+
* @since OutdoorKit 7.8.0
|
|
585
|
+
*/
|
|
586
|
+
enabled: number
|
|
587
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
588
|
+
complete?: () => void
|
|
589
|
+
/** 接口调用成功的回调函数 */
|
|
590
|
+
success?: () => void
|
|
591
|
+
/** 接口调用失败的回调函数 */
|
|
592
|
+
fail?: (params: {
|
|
593
|
+
/** 错误信息 */
|
|
594
|
+
errorMsg: string
|
|
595
|
+
/** 错误码 */
|
|
596
|
+
errorCode: string | number
|
|
597
|
+
/** 错误扩展 */
|
|
598
|
+
innerError: {
|
|
599
|
+
/** 错误扩展码 */
|
|
600
|
+
errorCode: string | number
|
|
601
|
+
/** 错误扩展信息 */
|
|
602
|
+
errorMsg: string
|
|
603
|
+
}
|
|
604
|
+
}) => void
|
|
605
|
+
}): void
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* 获取 AI 功能状态
|
|
609
|
+
* @public
|
|
610
|
+
* @since OutdoorKit 7.8.0
|
|
611
|
+
* @example Demo
|
|
612
|
+
* ```tsx
|
|
613
|
+
* ty.outdoor.getAIStatus({
|
|
614
|
+
* success: data => {
|
|
615
|
+
* console.log(data);
|
|
616
|
+
* },
|
|
617
|
+
* fail: error => {
|
|
618
|
+
* console.error(error);
|
|
619
|
+
* },
|
|
620
|
+
* });
|
|
621
|
+
* ```
|
|
622
|
+
* @platform iOS Android
|
|
623
|
+
*/
|
|
624
|
+
export function getAIStatus(params?: {
|
|
625
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
626
|
+
complete?: () => void
|
|
627
|
+
/** 接口调用成功的回调函数 */
|
|
628
|
+
success?: (params: {
|
|
629
|
+
/**
|
|
630
|
+
* AI 功能状态:0=关闭, 1=开启
|
|
631
|
+
* @since OutdoorKit 7.8.0
|
|
632
|
+
*/
|
|
633
|
+
enabled: number
|
|
634
|
+
}) => void
|
|
635
|
+
/** 接口调用失败的回调函数 */
|
|
636
|
+
fail?: (params: {
|
|
637
|
+
/** 错误信息 */
|
|
638
|
+
errorMsg: string
|
|
639
|
+
/** 错误码 */
|
|
640
|
+
errorCode: string | number
|
|
641
|
+
/** 错误扩展 */
|
|
642
|
+
innerError: {
|
|
643
|
+
/** 错误扩展码 */
|
|
644
|
+
errorCode: string | number
|
|
645
|
+
/** 错误扩展信息 */
|
|
646
|
+
errorMsg: string
|
|
647
|
+
}
|
|
648
|
+
}) => void
|
|
649
|
+
}): void
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* 检查固件版本
|
|
653
|
+
* @public
|
|
654
|
+
* @since OutdoorKit 7.8.0
|
|
655
|
+
* @example Demo
|
|
656
|
+
* ```tsx
|
|
657
|
+
* ty.outdoor.checkFirmwareVersion({
|
|
658
|
+
* success: data => {
|
|
659
|
+
* console.log(data);
|
|
660
|
+
* },
|
|
661
|
+
* fail: error => {
|
|
662
|
+
* console.error(error);
|
|
663
|
+
* },
|
|
664
|
+
* });
|
|
665
|
+
* ```
|
|
666
|
+
* @platform iOS Android
|
|
667
|
+
*/
|
|
668
|
+
export function checkFirmwareVersion(params?: {
|
|
669
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
670
|
+
complete?: () => void
|
|
671
|
+
/** 接口调用成功的回调函数 */
|
|
672
|
+
success?: (params: {
|
|
673
|
+
/**
|
|
674
|
+
* 当前固件版本号
|
|
675
|
+
* @since OutdoorKit 7.8.0
|
|
676
|
+
*/
|
|
677
|
+
currentVersion: string
|
|
678
|
+
/**
|
|
679
|
+
* 是否有可用更新:0=无, 1=有
|
|
680
|
+
* @since OutdoorKit 7.8.0
|
|
681
|
+
*/
|
|
682
|
+
hasUpdate: number
|
|
683
|
+
}) => void
|
|
684
|
+
/** 接口调用失败的回调函数 */
|
|
685
|
+
fail?: (params: {
|
|
686
|
+
/** 错误信息 */
|
|
687
|
+
errorMsg: string
|
|
688
|
+
/** 错误码 */
|
|
689
|
+
errorCode: string | number
|
|
690
|
+
/** 错误扩展 */
|
|
691
|
+
innerError: {
|
|
692
|
+
/** 错误扩展码 */
|
|
693
|
+
errorCode: string | number
|
|
694
|
+
/** 错误扩展信息 */
|
|
695
|
+
errorMsg: string
|
|
696
|
+
}
|
|
697
|
+
}) => void
|
|
698
|
+
}): void
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* 升级固件(设备会重启)
|
|
702
|
+
* @public
|
|
703
|
+
* @since OutdoorKit 7.8.0
|
|
704
|
+
* @example Demo
|
|
705
|
+
* ```tsx
|
|
706
|
+
* ty.outdoor.upgradeFirmware({
|
|
707
|
+
* firmwarePath: "xx",
|
|
708
|
+
* success: data => {
|
|
709
|
+
* console.log(data);
|
|
710
|
+
* },
|
|
711
|
+
* fail: error => {
|
|
712
|
+
* console.error(error);
|
|
713
|
+
* },
|
|
714
|
+
* });
|
|
715
|
+
* ```
|
|
716
|
+
* @platform iOS Android
|
|
717
|
+
*/
|
|
718
|
+
export function upgradeFirmware(params: {
|
|
719
|
+
/**
|
|
720
|
+
* 固件文件路径
|
|
721
|
+
* @since OutdoorKit 7.8.0
|
|
722
|
+
*/
|
|
723
|
+
firmwarePath: string
|
|
724
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
725
|
+
complete?: () => void
|
|
726
|
+
/** 接口调用成功的回调函数 */
|
|
727
|
+
success?: () => void
|
|
728
|
+
/** 接口调用失败的回调函数 */
|
|
729
|
+
fail?: (params: {
|
|
730
|
+
/** 错误信息 */
|
|
731
|
+
errorMsg: string
|
|
732
|
+
/** 错误码 */
|
|
733
|
+
errorCode: string | number
|
|
734
|
+
/** 错误扩展 */
|
|
735
|
+
innerError: {
|
|
736
|
+
/** 错误扩展码 */
|
|
737
|
+
errorCode: string | number
|
|
738
|
+
/** 错误扩展信息 */
|
|
739
|
+
errorMsg: string
|
|
740
|
+
}
|
|
741
|
+
}) => void
|
|
742
|
+
}): void
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* 获取文件列表
|
|
746
|
+
* @public
|
|
747
|
+
* @since OutdoorKit 7.8.0
|
|
748
|
+
* @example Demo
|
|
749
|
+
* ```tsx
|
|
750
|
+
* ty.outdoor.getFileList({
|
|
751
|
+
* path: "xx",
|
|
752
|
+
* success: data => {
|
|
753
|
+
* console.log(data);
|
|
754
|
+
* },
|
|
755
|
+
* fail: error => {
|
|
756
|
+
* console.error(error);
|
|
757
|
+
* },
|
|
758
|
+
* });
|
|
759
|
+
* ```
|
|
760
|
+
* @platform iOS Android
|
|
761
|
+
*/
|
|
762
|
+
export function getFileList(params: {
|
|
763
|
+
/**
|
|
764
|
+
* 目标路径
|
|
765
|
+
* @since OutdoorKit 7.8.0
|
|
766
|
+
*/
|
|
767
|
+
path: string
|
|
768
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
769
|
+
complete?: () => void
|
|
770
|
+
/** 接口调用成功的回调函数 */
|
|
771
|
+
success?: (params: {
|
|
772
|
+
/**
|
|
773
|
+
* 文件列表
|
|
774
|
+
* @since OutdoorKit 7.8.0
|
|
775
|
+
*/
|
|
776
|
+
files: FileItem[]
|
|
777
|
+
}) => void
|
|
778
|
+
/** 接口调用失败的回调函数 */
|
|
779
|
+
fail?: (params: {
|
|
780
|
+
/** 错误信息 */
|
|
781
|
+
errorMsg: string
|
|
782
|
+
/** 错误码 */
|
|
783
|
+
errorCode: string | number
|
|
784
|
+
/** 错误扩展 */
|
|
785
|
+
innerError: {
|
|
786
|
+
/** 错误扩展码 */
|
|
787
|
+
errorCode: string | number
|
|
788
|
+
/** 错误扩展信息 */
|
|
789
|
+
errorMsg: string
|
|
790
|
+
}
|
|
791
|
+
}) => void
|
|
792
|
+
}): void
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* 获取指定远端文件路径的下载/在线播放鉴权 HTTP Header(对应 RideSafe GetDownloadAuthHeader)
|
|
796
|
+
* @public
|
|
797
|
+
* @since OutdoorKit 7.8.0
|
|
798
|
+
* @example Demo
|
|
799
|
+
* ```tsx
|
|
800
|
+
* ty.outdoor.getDownloadAuthHeader({
|
|
801
|
+
* path: "xx",
|
|
802
|
+
* success: data => {
|
|
803
|
+
* console.log(data);
|
|
804
|
+
* },
|
|
805
|
+
* fail: error => {
|
|
806
|
+
* console.error(error);
|
|
807
|
+
* },
|
|
808
|
+
* });
|
|
809
|
+
* ```
|
|
810
|
+
* @platform iOS Android
|
|
811
|
+
*/
|
|
812
|
+
export function getDownloadAuthHeader(params: {
|
|
813
|
+
/**
|
|
814
|
+
* 目标路径
|
|
815
|
+
* @since OutdoorKit 7.8.0
|
|
816
|
+
*/
|
|
817
|
+
path: string
|
|
818
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
819
|
+
complete?: () => void
|
|
820
|
+
/** 接口调用成功的回调函数 */
|
|
821
|
+
success?: (params: {
|
|
822
|
+
/**
|
|
823
|
+
* 鉴权头原始字符串(多行 key: value,与肇观 Demo getHeader 一致)
|
|
824
|
+
* @since OutdoorKit 7.8.0
|
|
825
|
+
*/
|
|
826
|
+
header: string
|
|
827
|
+
}) => void
|
|
828
|
+
/** 接口调用失败的回调函数 */
|
|
829
|
+
fail?: (params: {
|
|
830
|
+
/** 错误信息 */
|
|
831
|
+
errorMsg: string
|
|
832
|
+
/** 错误码 */
|
|
833
|
+
errorCode: string | number
|
|
834
|
+
/** 错误扩展 */
|
|
835
|
+
innerError: {
|
|
836
|
+
/** 错误扩展码 */
|
|
837
|
+
errorCode: string | number
|
|
838
|
+
/** 错误扩展信息 */
|
|
839
|
+
errorMsg: string
|
|
840
|
+
}
|
|
841
|
+
}) => void
|
|
842
|
+
}): void
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* 下载文件(异步,进度通过 downloadProgress Event 推送)
|
|
846
|
+
* @public
|
|
847
|
+
* @since OutdoorKit 7.8.0
|
|
848
|
+
* @example Demo
|
|
849
|
+
* ```tsx
|
|
850
|
+
* ty.outdoor.downloadFile({
|
|
851
|
+
* remotePath: "xx",
|
|
852
|
+
* localPath: "xx",
|
|
853
|
+
* fileSizeBytes: 1,
|
|
854
|
+
* exportToPublicDownloads: false,
|
|
855
|
+
* deleteLocalAfterExport: false,
|
|
856
|
+
* success: data => {
|
|
857
|
+
* console.log(data);
|
|
858
|
+
* },
|
|
859
|
+
* fail: error => {
|
|
860
|
+
* console.error(error);
|
|
861
|
+
* },
|
|
862
|
+
* });
|
|
863
|
+
* ```
|
|
864
|
+
* @platform iOS Android
|
|
865
|
+
*/
|
|
866
|
+
export function downloadFile(params: {
|
|
867
|
+
/**
|
|
868
|
+
* 远端文件路径
|
|
869
|
+
* @since OutdoorKit 7.8.0
|
|
870
|
+
*/
|
|
871
|
+
remotePath: string
|
|
872
|
+
/**
|
|
873
|
+
* 本地存储路径
|
|
874
|
+
* @since OutdoorKit 7.8.0
|
|
875
|
+
*/
|
|
876
|
+
localPath: string
|
|
877
|
+
/**
|
|
878
|
+
* 可选:文件大小(字节),与 getFileList 中 FileItem.size 一致时可传,用于下载后校验与 post_verify 阶段进度。
|
|
879
|
+
* @since OutdoorKit 7.8.0
|
|
880
|
+
*/
|
|
881
|
+
fileSizeBytes?: number
|
|
882
|
+
/**
|
|
883
|
+
* Android-only: 下载完成后是否将文件额外导出到系统公共 Downloads 目录(Download/nvpdownload/<name>)。
|
|
884
|
+
* 默认 true,Android 上会把文件同时写入用户可见的 Downloads 目录(与 Sample 的列表下载一致);传 false 则仅保留到 localPath(应用私有缓存)。
|
|
885
|
+
* iOS / HarmonyOS 当前不实现该行为,字段仅为多端对齐预留。
|
|
886
|
+
* @since OutdoorKit 7.8.0
|
|
887
|
+
*/
|
|
888
|
+
exportToPublicDownloads?: boolean
|
|
889
|
+
/**
|
|
890
|
+
* Android-only: 成功导出到公共 Downloads 后,是否删除 localPath 指向的原始副本。
|
|
891
|
+
* 不传(默认)时使用智能策略:未传 localPath(由 lib 自动生成 cache 路径)→ 删除;传了 localPath → 保留。
|
|
892
|
+
* 显式传 true/false 会覆盖默认策略。export 失败或关闭时永不删除。
|
|
893
|
+
* @since OutdoorKit 7.8.0
|
|
894
|
+
*/
|
|
895
|
+
deleteLocalAfterExport?: boolean
|
|
896
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
897
|
+
complete?: () => void
|
|
898
|
+
/** 接口调用成功的回调函数 */
|
|
899
|
+
success?: () => void
|
|
900
|
+
/** 接口调用失败的回调函数 */
|
|
901
|
+
fail?: (params: {
|
|
902
|
+
/** 错误信息 */
|
|
903
|
+
errorMsg: string
|
|
904
|
+
/** 错误码 */
|
|
905
|
+
errorCode: string | number
|
|
906
|
+
/** 错误扩展 */
|
|
907
|
+
innerError: {
|
|
908
|
+
/** 错误扩展码 */
|
|
909
|
+
errorCode: string | number
|
|
910
|
+
/** 错误扩展信息 */
|
|
911
|
+
errorMsg: string
|
|
912
|
+
}
|
|
913
|
+
}) => void
|
|
914
|
+
}): void
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* 批量删除文件
|
|
918
|
+
* @public
|
|
919
|
+
* @since OutdoorKit 7.8.0
|
|
920
|
+
* @example Demo
|
|
921
|
+
* ```tsx
|
|
922
|
+
* ty.outdoor.deleteFiles({
|
|
923
|
+
* paths: [],
|
|
924
|
+
* success: data => {
|
|
925
|
+
* console.log(data);
|
|
926
|
+
* },
|
|
927
|
+
* fail: error => {
|
|
928
|
+
* console.error(error);
|
|
929
|
+
* },
|
|
930
|
+
* });
|
|
931
|
+
* ```
|
|
932
|
+
* @platform iOS Android
|
|
933
|
+
*/
|
|
934
|
+
export function deleteFiles(params: {
|
|
935
|
+
/**
|
|
936
|
+
* 待删除文件路径列表
|
|
937
|
+
* @since OutdoorKit 7.8.0
|
|
938
|
+
*/
|
|
939
|
+
paths: string[]
|
|
940
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
941
|
+
complete?: () => void
|
|
942
|
+
/** 接口调用成功的回调函数 */
|
|
943
|
+
success?: (params: {
|
|
944
|
+
/**
|
|
945
|
+
* 成功删除的文件数量
|
|
946
|
+
* @since OutdoorKit 7.8.0
|
|
947
|
+
*/
|
|
948
|
+
deletedCount: number
|
|
949
|
+
}) => void
|
|
950
|
+
/** 接口调用失败的回调函数 */
|
|
951
|
+
fail?: (params: {
|
|
952
|
+
/** 错误信息 */
|
|
953
|
+
errorMsg: string
|
|
954
|
+
/** 错误码 */
|
|
955
|
+
errorCode: string | number
|
|
956
|
+
/** 错误扩展 */
|
|
957
|
+
innerError: {
|
|
958
|
+
/** 错误扩展码 */
|
|
959
|
+
errorCode: string | number
|
|
960
|
+
/** 错误扩展信息 */
|
|
961
|
+
errorMsg: string
|
|
962
|
+
}
|
|
963
|
+
}) => void
|
|
964
|
+
}): void
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* 获取存储空间信息
|
|
968
|
+
* @public
|
|
969
|
+
* @since OutdoorKit 7.8.0
|
|
970
|
+
* @example Demo
|
|
971
|
+
* ```tsx
|
|
972
|
+
* ty.outdoor.getFreeSpace({
|
|
973
|
+
* success: data => {
|
|
974
|
+
* console.log(data);
|
|
975
|
+
* },
|
|
976
|
+
* fail: error => {
|
|
977
|
+
* console.error(error);
|
|
978
|
+
* },
|
|
979
|
+
* });
|
|
980
|
+
* ```
|
|
981
|
+
* @platform iOS Android
|
|
982
|
+
*/
|
|
983
|
+
export function getFreeSpace(params?: {
|
|
984
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
985
|
+
complete?: () => void
|
|
986
|
+
/** 接口调用成功的回调函数 */
|
|
987
|
+
success?: (params: {
|
|
988
|
+
/**
|
|
989
|
+
* 可用空间(字节)
|
|
990
|
+
* @since OutdoorKit 7.8.0
|
|
991
|
+
*/
|
|
992
|
+
free: number
|
|
993
|
+
/**
|
|
994
|
+
* 已用空间(字节)
|
|
995
|
+
* @since OutdoorKit 7.8.0
|
|
996
|
+
*/
|
|
997
|
+
used: number
|
|
998
|
+
/**
|
|
999
|
+
* 总空间(字节)
|
|
1000
|
+
* @since OutdoorKit 7.8.0
|
|
1001
|
+
*/
|
|
1002
|
+
total: number
|
|
1003
|
+
}) => void
|
|
1004
|
+
/** 接口调用失败的回调函数 */
|
|
1005
|
+
fail?: (params: {
|
|
1006
|
+
/** 错误信息 */
|
|
1007
|
+
errorMsg: string
|
|
1008
|
+
/** 错误码 */
|
|
1009
|
+
errorCode: string | number
|
|
1010
|
+
/** 错误扩展 */
|
|
1011
|
+
innerError: {
|
|
1012
|
+
/** 错误扩展码 */
|
|
1013
|
+
errorCode: string | number
|
|
1014
|
+
/** 错误扩展信息 */
|
|
1015
|
+
errorMsg: string
|
|
1016
|
+
}
|
|
1017
|
+
}) => void
|
|
1018
|
+
}): void
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* 打开原生视频播放器播放指定视频(支持远端流播放和本地文件播放)
|
|
1022
|
+
* @public
|
|
1023
|
+
* @since OutdoorKit 7.8.0
|
|
1024
|
+
* @example Demo
|
|
1025
|
+
* ```tsx
|
|
1026
|
+
* ty.outdoor.playVideo({
|
|
1027
|
+
* url: "xx",
|
|
1028
|
+
* fileSizeBytes: 1,
|
|
1029
|
+
* success: data => {
|
|
1030
|
+
* console.log(data);
|
|
1031
|
+
* },
|
|
1032
|
+
* fail: error => {
|
|
1033
|
+
* console.error(error);
|
|
1034
|
+
* },
|
|
1035
|
+
* });
|
|
1036
|
+
* ```
|
|
1037
|
+
* @platform iOS Android
|
|
1038
|
+
*/
|
|
1039
|
+
export function playVideo(params: {
|
|
1040
|
+
/**
|
|
1041
|
+
* 视频播放地址(远端 HTTP 流地址或本地文件路径,鉴权头由原生内部自动获取)
|
|
1042
|
+
* @since OutdoorKit 7.8.0
|
|
1043
|
+
*/
|
|
1044
|
+
url: string
|
|
1045
|
+
/**
|
|
1046
|
+
* 可选:文件大小(字节),与 getFileList 中 FileItem.size 一致时可传。
|
|
1047
|
+
* 当 ExoPlayer 无法从容器头取到 duration(NVP 设备 TS 流常见)时,用字节数 + 估算码率推导合理的总时长与进度条范围;
|
|
1048
|
+
* 不传则播放总时长可能显示异常、进度条无法拖动(与 Sample 列表播放保持一致即不会出现该问题)。
|
|
1049
|
+
* @since OutdoorKit 7.8.0
|
|
1050
|
+
*/
|
|
1051
|
+
fileSizeBytes?: number
|
|
1052
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1053
|
+
complete?: () => void
|
|
1054
|
+
/** 接口调用成功的回调函数 */
|
|
1055
|
+
success?: () => void
|
|
1056
|
+
/** 接口调用失败的回调函数 */
|
|
1057
|
+
fail?: (params: {
|
|
1058
|
+
/** 错误信息 */
|
|
1059
|
+
errorMsg: string
|
|
1060
|
+
/** 错误码 */
|
|
1061
|
+
errorCode: string | number
|
|
1062
|
+
/** 错误扩展 */
|
|
1063
|
+
innerError: {
|
|
1064
|
+
/** 错误扩展码 */
|
|
1065
|
+
errorCode: string | number
|
|
1066
|
+
/** 错误扩展信息 */
|
|
1067
|
+
errorMsg: string
|
|
1068
|
+
}
|
|
1069
|
+
}) => void
|
|
1070
|
+
}): void
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* 格式化磁盘(不可逆,设备会重启)
|
|
1074
|
+
* @public
|
|
1075
|
+
* @since OutdoorKit 7.8.0
|
|
1076
|
+
* @example Demo
|
|
1077
|
+
* ```tsx
|
|
1078
|
+
* ty.outdoor.formatDisk({
|
|
1079
|
+
* success: data => {
|
|
1080
|
+
* console.log(data);
|
|
1081
|
+
* },
|
|
1082
|
+
* fail: error => {
|
|
1083
|
+
* console.error(error);
|
|
1084
|
+
* },
|
|
1085
|
+
* });
|
|
1086
|
+
* ```
|
|
1087
|
+
* @platform iOS Android
|
|
1088
|
+
*/
|
|
1089
|
+
export function formatDisk(params?: {
|
|
1090
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
1091
|
+
complete?: () => void
|
|
1092
|
+
/** 接口调用成功的回调函数 */
|
|
1093
|
+
success?: () => void
|
|
1094
|
+
/** 接口调用失败的回调函数 */
|
|
1095
|
+
fail?: (params: {
|
|
1096
|
+
/** 错误信息 */
|
|
1097
|
+
errorMsg: string
|
|
1098
|
+
/** 错误码 */
|
|
1099
|
+
errorCode: string | number
|
|
1100
|
+
/** 错误扩展 */
|
|
1101
|
+
innerError: {
|
|
1102
|
+
/** 错误扩展码 */
|
|
1103
|
+
errorCode: string | number
|
|
1104
|
+
/** 错误扩展信息 */
|
|
1105
|
+
errorMsg: string
|
|
1106
|
+
}
|
|
1107
|
+
}) => void
|
|
1108
|
+
}): void
|
|
1109
|
+
|
|
7
1110
|
/**
|
|
8
1111
|
* 出行获取当前首页展示的设备ID
|
|
9
1112
|
* @public
|
|
10
1113
|
* @since OutdoorKit 1.0.0
|
|
1114
|
+
* @example Demo
|
|
1115
|
+
* ```tsx
|
|
1116
|
+
* ty.outdoor.currentDevice({
|
|
1117
|
+
* success: data => {
|
|
1118
|
+
* console.log(data);
|
|
1119
|
+
* },
|
|
1120
|
+
* fail: error => {
|
|
1121
|
+
* console.error(error);
|
|
1122
|
+
* },
|
|
1123
|
+
* });
|
|
1124
|
+
* ```
|
|
11
1125
|
* @platform iOS Android
|
|
12
1126
|
*/
|
|
13
1127
|
export function currentDevice(params?: {
|
|
@@ -41,6 +1155,17 @@ declare namespace ty.outdoor {
|
|
|
41
1155
|
* 切换设备,会弹出Native切换选择器
|
|
42
1156
|
* @public
|
|
43
1157
|
* @since OutdoorKit 1.0.4
|
|
1158
|
+
* @example Demo
|
|
1159
|
+
* ```tsx
|
|
1160
|
+
* ty.outdoor.switchDevice({
|
|
1161
|
+
* success: data => {
|
|
1162
|
+
* console.log(data);
|
|
1163
|
+
* },
|
|
1164
|
+
* fail: error => {
|
|
1165
|
+
* console.error(error);
|
|
1166
|
+
* },
|
|
1167
|
+
* });
|
|
1168
|
+
* ```
|
|
44
1169
|
* @platform iOS Android
|
|
45
1170
|
*/
|
|
46
1171
|
export function switchDevice(params?: {
|
|
@@ -68,6 +1193,17 @@ declare namespace ty.outdoor {
|
|
|
68
1193
|
* 获取出行设备列表(不含分享的设备)
|
|
69
1194
|
* @public
|
|
70
1195
|
* @since OutdoorKit 1.1.0
|
|
1196
|
+
* @example Demo
|
|
1197
|
+
* ```tsx
|
|
1198
|
+
* ty.outdoor.getDeviceList({
|
|
1199
|
+
* success: data => {
|
|
1200
|
+
* console.log(data);
|
|
1201
|
+
* },
|
|
1202
|
+
* fail: error => {
|
|
1203
|
+
* console.error(error);
|
|
1204
|
+
* },
|
|
1205
|
+
* });
|
|
1206
|
+
* ```
|
|
71
1207
|
* @platform iOS Android
|
|
72
1208
|
*/
|
|
73
1209
|
export function getDeviceList(params?: {
|
|
@@ -101,6 +1237,17 @@ declare namespace ty.outdoor {
|
|
|
101
1237
|
* 获取分享的设备列表
|
|
102
1238
|
* @public
|
|
103
1239
|
* @since OutdoorKit 1.1.0
|
|
1240
|
+
* @example Demo
|
|
1241
|
+
* ```tsx
|
|
1242
|
+
* ty.outdoor.getSharedDeviceList({
|
|
1243
|
+
* success: data => {
|
|
1244
|
+
* console.log(data);
|
|
1245
|
+
* },
|
|
1246
|
+
* fail: error => {
|
|
1247
|
+
* console.error(error);
|
|
1248
|
+
* },
|
|
1249
|
+
* });
|
|
1250
|
+
* ```
|
|
104
1251
|
* @platform iOS Android
|
|
105
1252
|
*/
|
|
106
1253
|
export function getSharedDeviceList(params?: {
|
|
@@ -131,9 +1278,21 @@ declare namespace ty.outdoor {
|
|
|
131
1278
|
}): void
|
|
132
1279
|
|
|
133
1280
|
/**
|
|
134
|
-
*
|
|
1281
|
+
* 指定当前设备,传入需要切换为当前展示的设备信息
|
|
135
1282
|
* @public
|
|
136
1283
|
* @since OutdoorKit 1.1.0
|
|
1284
|
+
* @example Demo
|
|
1285
|
+
* ```tsx
|
|
1286
|
+
* ty.outdoor.specifyDevice({
|
|
1287
|
+
* deviceID: "xx",
|
|
1288
|
+
* success: data => {
|
|
1289
|
+
* console.log(data);
|
|
1290
|
+
* },
|
|
1291
|
+
* fail: error => {
|
|
1292
|
+
* console.error(error);
|
|
1293
|
+
* },
|
|
1294
|
+
* });
|
|
1295
|
+
* ```
|
|
137
1296
|
* @platform iOS Android
|
|
138
1297
|
*/
|
|
139
1298
|
export function specifyDevice(params: {
|
|
@@ -166,6 +1325,17 @@ declare namespace ty.outdoor {
|
|
|
166
1325
|
* 获取已绑定设备ID集合
|
|
167
1326
|
* @public
|
|
168
1327
|
* @since OutdoorKit 1.0.1
|
|
1328
|
+
* @example Demo
|
|
1329
|
+
* ```tsx
|
|
1330
|
+
* ty.outdoor.getBoundDeviceIdList({
|
|
1331
|
+
* success: data => {
|
|
1332
|
+
* console.log(data);
|
|
1333
|
+
* },
|
|
1334
|
+
* fail: error => {
|
|
1335
|
+
* console.error(error);
|
|
1336
|
+
* },
|
|
1337
|
+
* });
|
|
1338
|
+
* ```
|
|
169
1339
|
* @platform iOS Android
|
|
170
1340
|
*/
|
|
171
1341
|
export function getBoundDeviceIdList(params?: {
|
|
@@ -199,6 +1369,17 @@ declare namespace ty.outdoor {
|
|
|
199
1369
|
* 获取可绑定设备ID集合
|
|
200
1370
|
* @public
|
|
201
1371
|
* @since OutdoorKit 1.0.1
|
|
1372
|
+
* @example Demo
|
|
1373
|
+
* ```tsx
|
|
1374
|
+
* ty.outdoor.getUnbindDeviceIdList({
|
|
1375
|
+
* success: data => {
|
|
1376
|
+
* console.log(data);
|
|
1377
|
+
* },
|
|
1378
|
+
* fail: error => {
|
|
1379
|
+
* console.error(error);
|
|
1380
|
+
* },
|
|
1381
|
+
* });
|
|
1382
|
+
* ```
|
|
202
1383
|
* @platform iOS Android
|
|
203
1384
|
*/
|
|
204
1385
|
export function getUnbindDeviceIdList(params?: {
|
|
@@ -229,9 +1410,22 @@ declare namespace ty.outdoor {
|
|
|
229
1410
|
}): void
|
|
230
1411
|
|
|
231
1412
|
/**
|
|
232
|
-
*
|
|
1413
|
+
* 绑定从设备到指定主设备
|
|
233
1414
|
* @public
|
|
234
1415
|
* @since OutdoorKit 1.0.1
|
|
1416
|
+
* @example Demo
|
|
1417
|
+
* ```tsx
|
|
1418
|
+
* ty.outdoor.bindSlaveDevice({
|
|
1419
|
+
* slaveDevId: "xx",
|
|
1420
|
+
* masterDevId: "xx",
|
|
1421
|
+
* success: data => {
|
|
1422
|
+
* console.log(data);
|
|
1423
|
+
* },
|
|
1424
|
+
* fail: error => {
|
|
1425
|
+
* console.error(error);
|
|
1426
|
+
* },
|
|
1427
|
+
* });
|
|
1428
|
+
* ```
|
|
235
1429
|
* @platform iOS Android
|
|
236
1430
|
*/
|
|
237
1431
|
export function bindSlaveDevice(params: {
|
|
@@ -269,6 +1463,18 @@ declare namespace ty.outdoor {
|
|
|
269
1463
|
* 从设备移除
|
|
270
1464
|
* @public
|
|
271
1465
|
* @since OutdoorKit 1.0.1
|
|
1466
|
+
* @example Demo
|
|
1467
|
+
* ```tsx
|
|
1468
|
+
* ty.outdoor.unbindDevice({
|
|
1469
|
+
* devId: "xx",
|
|
1470
|
+
* success: data => {
|
|
1471
|
+
* console.log(data);
|
|
1472
|
+
* },
|
|
1473
|
+
* fail: error => {
|
|
1474
|
+
* console.error(error);
|
|
1475
|
+
* },
|
|
1476
|
+
* });
|
|
1477
|
+
* ```
|
|
272
1478
|
* @platform iOS Android
|
|
273
1479
|
*/
|
|
274
1480
|
export function unbindDevice(params: {
|
|
@@ -298,9 +1504,23 @@ declare namespace ty.outdoor {
|
|
|
298
1504
|
}): void
|
|
299
1505
|
|
|
300
1506
|
/**
|
|
301
|
-
*
|
|
1507
|
+
* 小程序表盘设置,配置表盘左/中/右三个区域展示的数据 tag
|
|
302
1508
|
* @public
|
|
303
1509
|
* @since OutdoorKit 1.0.1
|
|
1510
|
+
* @example Demo
|
|
1511
|
+
* ```tsx
|
|
1512
|
+
* ty.outdoor.saveDialViewTag({
|
|
1513
|
+
* leftViewTag: "xx",
|
|
1514
|
+
* centerViewTag: "xx",
|
|
1515
|
+
* rightViewTag: "xx",
|
|
1516
|
+
* success: data => {
|
|
1517
|
+
* console.log(data);
|
|
1518
|
+
* },
|
|
1519
|
+
* fail: error => {
|
|
1520
|
+
* console.error(error);
|
|
1521
|
+
* },
|
|
1522
|
+
* });
|
|
1523
|
+
* ```
|
|
304
1524
|
* @platform iOS Android
|
|
305
1525
|
*/
|
|
306
1526
|
export function saveDialViewTag(params: {
|
|
@@ -343,6 +1563,24 @@ declare namespace ty.outdoor {
|
|
|
343
1563
|
* 保存骑行语音播报数据
|
|
344
1564
|
* @public
|
|
345
1565
|
* @since OutdoorKit 1.0.1
|
|
1566
|
+
* @example Demo
|
|
1567
|
+
* ```tsx
|
|
1568
|
+
* ty.outdoor.saveTTSData({
|
|
1569
|
+
* ttsMainSwitch: false,
|
|
1570
|
+
* weather: false,
|
|
1571
|
+
* abnormalWear: false,
|
|
1572
|
+
* cyclingMileage: false,
|
|
1573
|
+
* lowBattery: false,
|
|
1574
|
+
* electricThreshold: 1,
|
|
1575
|
+
* callReminder: false,
|
|
1576
|
+
* success: data => {
|
|
1577
|
+
* console.log(data);
|
|
1578
|
+
* },
|
|
1579
|
+
* fail: error => {
|
|
1580
|
+
* console.error(error);
|
|
1581
|
+
* },
|
|
1582
|
+
* });
|
|
1583
|
+
* ```
|
|
346
1584
|
* @platform iOS Android
|
|
347
1585
|
*/
|
|
348
1586
|
export function saveTTSData(params: {
|
|
@@ -357,12 +1595,12 @@ declare namespace ty.outdoor {
|
|
|
357
1595
|
*/
|
|
358
1596
|
weather: boolean
|
|
359
1597
|
/**
|
|
360
|
-
*
|
|
1598
|
+
* 异常佩戴播报开关
|
|
361
1599
|
* @since OutdoorKit 1.0.1
|
|
362
1600
|
*/
|
|
363
1601
|
abnormalWear: boolean
|
|
364
1602
|
/**
|
|
365
|
-
*
|
|
1603
|
+
* 骑行里程播报开关
|
|
366
1604
|
* @since OutdoorKit 1.0.1
|
|
367
1605
|
*/
|
|
368
1606
|
cyclingMileage: boolean
|
|
@@ -372,12 +1610,12 @@ declare namespace ty.outdoor {
|
|
|
372
1610
|
*/
|
|
373
1611
|
lowBattery: boolean
|
|
374
1612
|
/**
|
|
375
|
-
*
|
|
1613
|
+
* 低电量播报阈值,电量低于该百分比时触发播报
|
|
376
1614
|
* @since OutdoorKit 1.0.1
|
|
377
1615
|
*/
|
|
378
1616
|
electricThreshold: number
|
|
379
1617
|
/**
|
|
380
|
-
*
|
|
1618
|
+
* 来电提醒播报开关
|
|
381
1619
|
* @since OutdoorKit 1.0.1
|
|
382
1620
|
*/
|
|
383
1621
|
callReminder: boolean
|
|
@@ -405,6 +1643,17 @@ declare namespace ty.outdoor {
|
|
|
405
1643
|
* 获取骑行播报数据
|
|
406
1644
|
* @public
|
|
407
1645
|
* @since OutdoorKit 1.0.1
|
|
1646
|
+
* @example Demo
|
|
1647
|
+
* ```tsx
|
|
1648
|
+
* ty.outdoor.getTTSData({
|
|
1649
|
+
* success: data => {
|
|
1650
|
+
* console.log(data);
|
|
1651
|
+
* },
|
|
1652
|
+
* fail: error => {
|
|
1653
|
+
* console.error(error);
|
|
1654
|
+
* },
|
|
1655
|
+
* });
|
|
1656
|
+
* ```
|
|
408
1657
|
* @platform iOS Android
|
|
409
1658
|
*/
|
|
410
1659
|
export function getTTSData(params?: {
|
|
@@ -423,12 +1672,12 @@ declare namespace ty.outdoor {
|
|
|
423
1672
|
*/
|
|
424
1673
|
weather: boolean
|
|
425
1674
|
/**
|
|
426
|
-
*
|
|
1675
|
+
* 异常佩戴播报开关
|
|
427
1676
|
* @since OutdoorKit 1.0.1
|
|
428
1677
|
*/
|
|
429
1678
|
abnormalWear: boolean
|
|
430
1679
|
/**
|
|
431
|
-
*
|
|
1680
|
+
* 骑行里程播报开关
|
|
432
1681
|
* @since OutdoorKit 1.0.1
|
|
433
1682
|
*/
|
|
434
1683
|
cyclingMileage: boolean
|
|
@@ -438,12 +1687,12 @@ declare namespace ty.outdoor {
|
|
|
438
1687
|
*/
|
|
439
1688
|
lowBattery: boolean
|
|
440
1689
|
/**
|
|
441
|
-
*
|
|
1690
|
+
* 低电量播报阈值,电量低于该百分比时触发播报
|
|
442
1691
|
* @since OutdoorKit 1.0.1
|
|
443
1692
|
*/
|
|
444
1693
|
electricThreshold: number
|
|
445
1694
|
/**
|
|
446
|
-
*
|
|
1695
|
+
* 来电提醒播报开关
|
|
447
1696
|
* @since OutdoorKit 1.0.1
|
|
448
1697
|
*/
|
|
449
1698
|
callReminder: boolean
|
|
@@ -468,6 +1717,17 @@ declare namespace ty.outdoor {
|
|
|
468
1717
|
* 是否有通话权限
|
|
469
1718
|
* @public
|
|
470
1719
|
* @since OutdoorKit 1.0.1
|
|
1720
|
+
* @example Demo
|
|
1721
|
+
* ```tsx
|
|
1722
|
+
* ty.outdoor.isCallPhoneGranted({
|
|
1723
|
+
* success: data => {
|
|
1724
|
+
* console.log(data);
|
|
1725
|
+
* },
|
|
1726
|
+
* fail: error => {
|
|
1727
|
+
* console.error(error);
|
|
1728
|
+
* },
|
|
1729
|
+
* });
|
|
1730
|
+
* ```
|
|
471
1731
|
* @platform iOS Android
|
|
472
1732
|
*/
|
|
473
1733
|
export function isCallPhoneGranted(params?: {
|
|
@@ -495,6 +1755,17 @@ declare namespace ty.outdoor {
|
|
|
495
1755
|
* 申请通话权限
|
|
496
1756
|
* @public
|
|
497
1757
|
* @since OutdoorKit 1.0.1
|
|
1758
|
+
* @example Demo
|
|
1759
|
+
* ```tsx
|
|
1760
|
+
* ty.outdoor.requestCallPhonePermission({
|
|
1761
|
+
* success: data => {
|
|
1762
|
+
* console.log(data);
|
|
1763
|
+
* },
|
|
1764
|
+
* fail: error => {
|
|
1765
|
+
* console.error(error);
|
|
1766
|
+
* },
|
|
1767
|
+
* });
|
|
1768
|
+
* ```
|
|
498
1769
|
* @platform iOS Android
|
|
499
1770
|
*/
|
|
500
1771
|
export function requestCallPhonePermission(params?: {
|
|
@@ -519,9 +1790,21 @@ declare namespace ty.outdoor {
|
|
|
519
1790
|
}): void
|
|
520
1791
|
|
|
521
1792
|
/**
|
|
522
|
-
*
|
|
1793
|
+
* 判断是否为 BLE+X 设备
|
|
523
1794
|
* @public
|
|
524
1795
|
* @since OutdoorKit 1.1.0
|
|
1796
|
+
* @example Demo
|
|
1797
|
+
* ```tsx
|
|
1798
|
+
* ty.outdoor.isBLEXDevice({
|
|
1799
|
+
* deviceID: "xx",
|
|
1800
|
+
* success: data => {
|
|
1801
|
+
* console.log(data);
|
|
1802
|
+
* },
|
|
1803
|
+
* fail: error => {
|
|
1804
|
+
* console.error(error);
|
|
1805
|
+
* },
|
|
1806
|
+
* });
|
|
1807
|
+
* ```
|
|
525
1808
|
* @platform iOS Android
|
|
526
1809
|
*/
|
|
527
1810
|
export function isBLEXDevice(params: {
|
|
@@ -551,9 +1834,21 @@ declare namespace ty.outdoor {
|
|
|
551
1834
|
}): void
|
|
552
1835
|
|
|
553
1836
|
/**
|
|
554
|
-
* BLE+X
|
|
1837
|
+
* 判断 BLE+X 设备是否已激活,前置条件:该设备为 BLE+X 设备
|
|
555
1838
|
* @public
|
|
556
1839
|
* @since OutdoorKit 1.1.0
|
|
1840
|
+
* @example Demo
|
|
1841
|
+
* ```tsx
|
|
1842
|
+
* ty.outdoor.isBLEXDeviceActived({
|
|
1843
|
+
* deviceID: "xx",
|
|
1844
|
+
* success: data => {
|
|
1845
|
+
* console.log(data);
|
|
1846
|
+
* },
|
|
1847
|
+
* fail: error => {
|
|
1848
|
+
* console.error(error);
|
|
1849
|
+
* },
|
|
1850
|
+
* });
|
|
1851
|
+
* ```
|
|
557
1852
|
* @platform iOS Android
|
|
558
1853
|
*/
|
|
559
1854
|
export function isBLEXDeviceActived(params: {
|
|
@@ -583,9 +1878,21 @@ declare namespace ty.outdoor {
|
|
|
583
1878
|
}): void
|
|
584
1879
|
|
|
585
1880
|
/**
|
|
586
|
-
*
|
|
1881
|
+
* 获取扩展模组关联事件配置
|
|
587
1882
|
* @public
|
|
588
1883
|
* @since OutdoorKit 1.1.0
|
|
1884
|
+
* @example Demo
|
|
1885
|
+
* ```tsx
|
|
1886
|
+
* ty.outdoor.getExtendedModuleExtConfig({
|
|
1887
|
+
* deviceID: "xx",
|
|
1888
|
+
* success: data => {
|
|
1889
|
+
* console.log(data);
|
|
1890
|
+
* },
|
|
1891
|
+
* fail: error => {
|
|
1892
|
+
* console.error(error);
|
|
1893
|
+
* },
|
|
1894
|
+
* });
|
|
1895
|
+
* ```
|
|
589
1896
|
* @platform iOS Android
|
|
590
1897
|
*/
|
|
591
1898
|
export function getExtendedModuleExtConfig(params: {
|
|
@@ -599,17 +1906,17 @@ declare namespace ty.outdoor {
|
|
|
599
1906
|
/** 接口调用成功的回调函数 */
|
|
600
1907
|
success?: (params: {
|
|
601
1908
|
/**
|
|
602
|
-
* auto_active
|
|
1909
|
+
* 激活方式,取值:auto_active(自动激活)/ manual_active(手动激活)
|
|
603
1910
|
* @since OutdoorKit 1.1.0
|
|
604
1911
|
*/
|
|
605
1912
|
activeType: string
|
|
606
1913
|
/**
|
|
607
|
-
* disabled
|
|
1914
|
+
* 未激活时的交互方式,取值:disabled(置灰禁用)/ hide(隐藏)
|
|
608
1915
|
* @since OutdoorKit 1.1.0
|
|
609
1916
|
*/
|
|
610
1917
|
interactionType: string
|
|
611
1918
|
/**
|
|
612
|
-
*
|
|
1919
|
+
* 关联的 dpID 列表
|
|
613
1920
|
* @since OutdoorKit 1.1.0
|
|
614
1921
|
*/
|
|
615
1922
|
assocaitedDps: number[]
|
|
@@ -631,9 +1938,21 @@ declare namespace ty.outdoor {
|
|
|
631
1938
|
}): void
|
|
632
1939
|
|
|
633
1940
|
/**
|
|
634
|
-
*
|
|
1941
|
+
* 获取设备增值服务能力,返回以字典形式透传的能力数据
|
|
635
1942
|
* @public
|
|
636
1943
|
* @since OutdoorKit 1.1.0
|
|
1944
|
+
* @example Demo
|
|
1945
|
+
* ```tsx
|
|
1946
|
+
* ty.outdoor.getValueAddedServicesAbility({
|
|
1947
|
+
* deviceID: "xx",
|
|
1948
|
+
* success: data => {
|
|
1949
|
+
* console.log(data);
|
|
1950
|
+
* },
|
|
1951
|
+
* fail: error => {
|
|
1952
|
+
* console.error(error);
|
|
1953
|
+
* },
|
|
1954
|
+
* });
|
|
1955
|
+
* ```
|
|
637
1956
|
* @platform iOS Android
|
|
638
1957
|
*/
|
|
639
1958
|
export function getValueAddedServicesAbility(params: {
|
|
@@ -647,7 +1966,7 @@ declare namespace ty.outdoor {
|
|
|
647
1966
|
/** 接口调用成功的回调函数 */
|
|
648
1967
|
success?: (params: {
|
|
649
1968
|
/**
|
|
650
|
-
*
|
|
1969
|
+
* 透传结果字典,键值对内容由业务侧定义
|
|
651
1970
|
* @since OutdoorKit 1.1.0
|
|
652
1971
|
*/
|
|
653
1972
|
result: Record<any, any>
|
|
@@ -669,9 +1988,22 @@ declare namespace ty.outdoor {
|
|
|
669
1988
|
}): void
|
|
670
1989
|
|
|
671
1990
|
/**
|
|
672
|
-
*
|
|
1991
|
+
* 设置增值服务弹窗状态,记录指定设备是否已弹窗过
|
|
673
1992
|
* @public
|
|
674
1993
|
* @since OutdoorKit 1.1.0
|
|
1994
|
+
* @example Demo
|
|
1995
|
+
* ```tsx
|
|
1996
|
+
* ty.outdoor.setValueAddedServicesPop({
|
|
1997
|
+
* deviceID: "xx",
|
|
1998
|
+
* hadPopup: false,
|
|
1999
|
+
* success: data => {
|
|
2000
|
+
* console.log(data);
|
|
2001
|
+
* },
|
|
2002
|
+
* fail: error => {
|
|
2003
|
+
* console.error(error);
|
|
2004
|
+
* },
|
|
2005
|
+
* });
|
|
2006
|
+
* ```
|
|
675
2007
|
* @platform iOS Android
|
|
676
2008
|
*/
|
|
677
2009
|
export function setValueAddedServicesPop(params: {
|
|
@@ -709,11 +2041,15 @@ declare namespace ty.outdoor {
|
|
|
709
2041
|
* 获取感应解锁类型
|
|
710
2042
|
* @public
|
|
711
2043
|
* @since OutdoorKit 1.1.0
|
|
2044
|
+
* @example Demo
|
|
2045
|
+
* ```tsx
|
|
2046
|
+
* ty.outdoor.getInductiveUnlockType({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2047
|
+
* ```
|
|
712
2048
|
* @platform iOS Android
|
|
713
2049
|
*/
|
|
714
2050
|
export function getInductiveUnlockType(params: {
|
|
715
2051
|
/**
|
|
716
|
-
* 设备
|
|
2052
|
+
* 设备 ID
|
|
717
2053
|
* @since OutdoorKit 1.1.0
|
|
718
2054
|
*/
|
|
719
2055
|
deviceID: string
|
|
@@ -722,7 +2058,7 @@ declare namespace ty.outdoor {
|
|
|
722
2058
|
/** 接口调用成功的回调函数 */
|
|
723
2059
|
success?: (params: {
|
|
724
2060
|
/**
|
|
725
|
-
*
|
|
2061
|
+
* 感应解锁类型,按位枚举:InductiveUnlockTypeBLEHID = 1 << 0,InductiveUnlockTypeBT = 1 << 1
|
|
726
2062
|
* @since OutdoorKit 1.1.0
|
|
727
2063
|
*/
|
|
728
2064
|
inductiveUnlockType: number
|
|
@@ -744,14 +2080,18 @@ declare namespace ty.outdoor {
|
|
|
744
2080
|
}): void
|
|
745
2081
|
|
|
746
2082
|
/**
|
|
747
|
-
* 获取 HID
|
|
2083
|
+
* 获取 HID 感应解锁开关状态
|
|
748
2084
|
* @public
|
|
749
2085
|
* @since OutdoorKit 1.1.0
|
|
2086
|
+
* @example Demo
|
|
2087
|
+
* ```tsx
|
|
2088
|
+
* ty.outdoor.getHIDInductiveUnlockStatus({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2089
|
+
* ```
|
|
750
2090
|
* @platform iOS Android
|
|
751
2091
|
*/
|
|
752
2092
|
export function getHIDInductiveUnlockStatus(params: {
|
|
753
2093
|
/**
|
|
754
|
-
* 设备
|
|
2094
|
+
* 设备 ID
|
|
755
2095
|
* @since OutdoorKit 1.1.0
|
|
756
2096
|
*/
|
|
757
2097
|
deviceID: string
|
|
@@ -776,14 +2116,18 @@ declare namespace ty.outdoor {
|
|
|
776
2116
|
}): void
|
|
777
2117
|
|
|
778
2118
|
/**
|
|
779
|
-
* 获取 HID 感应解锁绑定状态
|
|
2119
|
+
* 获取 HID 感应解锁绑定状态
|
|
780
2120
|
* @public
|
|
781
2121
|
* @since OutdoorKit 1.1.0
|
|
2122
|
+
* @example Demo
|
|
2123
|
+
* ```tsx
|
|
2124
|
+
* ty.outdoor.getHIDInductiveUnlockBindStatus({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2125
|
+
* ```
|
|
782
2126
|
* @platform iOS Android
|
|
783
2127
|
*/
|
|
784
2128
|
export function getHIDInductiveUnlockBindStatus(params: {
|
|
785
2129
|
/**
|
|
786
|
-
* 设备
|
|
2130
|
+
* 设备 ID
|
|
787
2131
|
* @since OutdoorKit 1.1.0
|
|
788
2132
|
*/
|
|
789
2133
|
deviceID: string
|
|
@@ -811,11 +2155,15 @@ declare namespace ty.outdoor {
|
|
|
811
2155
|
* 开启 HID 感应解锁
|
|
812
2156
|
* @public
|
|
813
2157
|
* @since OutdoorKit 1.1.0
|
|
2158
|
+
* @example Demo
|
|
2159
|
+
* ```tsx
|
|
2160
|
+
* ty.outdoor.turnOnHIDInductiveUnlock({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2161
|
+
* ```
|
|
814
2162
|
* @platform iOS Android
|
|
815
2163
|
*/
|
|
816
2164
|
export function turnOnHIDInductiveUnlock(params: {
|
|
817
2165
|
/**
|
|
818
|
-
* 设备
|
|
2166
|
+
* 设备 ID
|
|
819
2167
|
* @since OutdoorKit 1.1.0
|
|
820
2168
|
*/
|
|
821
2169
|
deviceID: string
|
|
@@ -843,11 +2191,15 @@ declare namespace ty.outdoor {
|
|
|
843
2191
|
* 关闭 HID 感应解锁
|
|
844
2192
|
* @public
|
|
845
2193
|
* @since OutdoorKit 1.1.0
|
|
2194
|
+
* @example Demo
|
|
2195
|
+
* ```tsx
|
|
2196
|
+
* ty.outdoor.turnOffHIDInductiveUnlock({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2197
|
+
* ```
|
|
846
2198
|
* @platform iOS Android
|
|
847
2199
|
*/
|
|
848
2200
|
export function turnOffHIDInductiveUnlock(params: {
|
|
849
2201
|
/**
|
|
850
|
-
* 设备
|
|
2202
|
+
* 设备 ID
|
|
851
2203
|
* @since OutdoorKit 1.1.0
|
|
852
2204
|
*/
|
|
853
2205
|
deviceID: string
|
|
@@ -872,14 +2224,18 @@ declare namespace ty.outdoor {
|
|
|
872
2224
|
}): void
|
|
873
2225
|
|
|
874
2226
|
/**
|
|
875
|
-
* HID
|
|
2227
|
+
* 记录 HID 感应解锁的设防距离(在当前位置标定设防距离)
|
|
876
2228
|
* @public
|
|
877
2229
|
* @since OutdoorKit 1.1.0
|
|
2230
|
+
* @example Demo
|
|
2231
|
+
* ```tsx
|
|
2232
|
+
* ty.outdoor.recordHIDInductiveUnlockFortifyDistance({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2233
|
+
* ```
|
|
878
2234
|
* @platform iOS Android
|
|
879
2235
|
*/
|
|
880
2236
|
export function recordHIDInductiveUnlockFortifyDistance(params: {
|
|
881
2237
|
/**
|
|
882
|
-
* 设备
|
|
2238
|
+
* 设备 ID
|
|
883
2239
|
* @since OutdoorKit 1.1.0
|
|
884
2240
|
*/
|
|
885
2241
|
deviceID: string
|
|
@@ -904,14 +2260,18 @@ declare namespace ty.outdoor {
|
|
|
904
2260
|
}): void
|
|
905
2261
|
|
|
906
2262
|
/**
|
|
907
|
-
* HID
|
|
2263
|
+
* 记录 HID 感应解锁的解防距离(在当前位置标定解防距离)
|
|
908
2264
|
* @public
|
|
909
2265
|
* @since OutdoorKit 1.1.0
|
|
2266
|
+
* @example Demo
|
|
2267
|
+
* ```tsx
|
|
2268
|
+
* ty.outdoor.recordHIDInductiveUnlockDisarmDistance({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2269
|
+
* ```
|
|
910
2270
|
* @platform iOS Android
|
|
911
2271
|
*/
|
|
912
2272
|
export function recordHIDInductiveUnlockDisarmDistance(params: {
|
|
913
2273
|
/**
|
|
914
|
-
* 设备
|
|
2274
|
+
* 设备 ID
|
|
915
2275
|
* @since OutdoorKit 1.1.0
|
|
916
2276
|
*/
|
|
917
2277
|
deviceID: string
|
|
@@ -936,14 +2296,18 @@ declare namespace ty.outdoor {
|
|
|
936
2296
|
}): void
|
|
937
2297
|
|
|
938
2298
|
/**
|
|
939
|
-
* 获取 BT
|
|
2299
|
+
* 获取 BT 感应解锁配对状态
|
|
940
2300
|
* @public
|
|
941
2301
|
* @since OutdoorKit 1.1.0
|
|
2302
|
+
* @example Demo
|
|
2303
|
+
* ```tsx
|
|
2304
|
+
* ty.outdoor.getBTInductiveUnlockPairedStatus({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2305
|
+
* ```
|
|
942
2306
|
* @platform iOS Android
|
|
943
2307
|
*/
|
|
944
2308
|
export function getBTInductiveUnlockPairedStatus(params: {
|
|
945
2309
|
/**
|
|
946
|
-
* 设备
|
|
2310
|
+
* 设备 ID
|
|
947
2311
|
* @since OutdoorKit 1.1.0
|
|
948
2312
|
*/
|
|
949
2313
|
deviceID: string
|
|
@@ -971,11 +2335,15 @@ declare namespace ty.outdoor {
|
|
|
971
2335
|
* 开启 BT 感应解锁
|
|
972
2336
|
* @public
|
|
973
2337
|
* @since OutdoorKit 1.1.0
|
|
2338
|
+
* @example Demo
|
|
2339
|
+
* ```tsx
|
|
2340
|
+
* ty.outdoor.turnOnBTInductiveUnlock({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2341
|
+
* ```
|
|
974
2342
|
* @platform iOS Android
|
|
975
2343
|
*/
|
|
976
2344
|
export function turnOnBTInductiveUnlock(params: {
|
|
977
2345
|
/**
|
|
978
|
-
* 设备
|
|
2346
|
+
* 设备 ID
|
|
979
2347
|
* @since OutdoorKit 1.1.0
|
|
980
2348
|
*/
|
|
981
2349
|
deviceID: string
|
|
@@ -1003,11 +2371,15 @@ declare namespace ty.outdoor {
|
|
|
1003
2371
|
* 关闭 BT 感应解锁
|
|
1004
2372
|
* @public
|
|
1005
2373
|
* @since OutdoorKit 1.1.0
|
|
2374
|
+
* @example Demo
|
|
2375
|
+
* ```tsx
|
|
2376
|
+
* ty.outdoor.turnOffBTInductiveUnlock({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2377
|
+
* ```
|
|
1006
2378
|
* @platform iOS Android
|
|
1007
2379
|
*/
|
|
1008
2380
|
export function turnOffBTInductiveUnlock(params: {
|
|
1009
2381
|
/**
|
|
1010
|
-
* 设备
|
|
2382
|
+
* 设备 ID
|
|
1011
2383
|
* @since OutdoorKit 1.1.0
|
|
1012
2384
|
*/
|
|
1013
2385
|
deviceID: string
|
|
@@ -1032,9 +2404,13 @@ declare namespace ty.outdoor {
|
|
|
1032
2404
|
}): void
|
|
1033
2405
|
|
|
1034
2406
|
/**
|
|
1035
|
-
* 设置 BT
|
|
2407
|
+
* 设置 BT 感应解锁距离档位(可选值 1、2、3)
|
|
1036
2408
|
* @public
|
|
1037
2409
|
* @since OutdoorKit 1.1.0
|
|
2410
|
+
* @example Demo
|
|
2411
|
+
* ```tsx
|
|
2412
|
+
* ty.outdoor.setBTInductiveUnlockDistance({ deviceID: "xx", distance: 1, success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2413
|
+
* ```
|
|
1038
2414
|
* @platform iOS Android
|
|
1039
2415
|
*/
|
|
1040
2416
|
export function setBTInductiveUnlockDistance(params: {
|
|
@@ -1044,7 +2420,7 @@ declare namespace ty.outdoor {
|
|
|
1044
2420
|
*/
|
|
1045
2421
|
deviceID: string
|
|
1046
2422
|
/**
|
|
1047
|
-
*
|
|
2423
|
+
* 距离档位(可选值 1、2、3)
|
|
1048
2424
|
* @since OutdoorKit 1.1.0
|
|
1049
2425
|
*/
|
|
1050
2426
|
distance: number
|
|
@@ -1069,14 +2445,18 @@ declare namespace ty.outdoor {
|
|
|
1069
2445
|
}): void
|
|
1070
2446
|
|
|
1071
2447
|
/**
|
|
1072
|
-
* 获取 BT
|
|
2448
|
+
* 获取 BT 感应解锁距离档位
|
|
1073
2449
|
* @public
|
|
1074
2450
|
* @since OutdoorKit 1.1.0
|
|
2451
|
+
* @example Demo
|
|
2452
|
+
* ```tsx
|
|
2453
|
+
* ty.outdoor.getBTInductiveUnlockDistance({ deviceID: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2454
|
+
* ```
|
|
1075
2455
|
* @platform iOS Android
|
|
1076
2456
|
*/
|
|
1077
2457
|
export function getBTInductiveUnlockDistance(params: {
|
|
1078
2458
|
/**
|
|
1079
|
-
* 设备
|
|
2459
|
+
* 设备 ID
|
|
1080
2460
|
* @since OutdoorKit 1.1.0
|
|
1081
2461
|
*/
|
|
1082
2462
|
deviceID: string
|
|
@@ -1090,7 +2470,7 @@ declare namespace ty.outdoor {
|
|
|
1090
2470
|
*/
|
|
1091
2471
|
deviceID: string
|
|
1092
2472
|
/**
|
|
1093
|
-
*
|
|
2473
|
+
* 距离档位(可选值 1、2、3)
|
|
1094
2474
|
* @since OutdoorKit 1.1.0
|
|
1095
2475
|
*/
|
|
1096
2476
|
distance: number
|
|
@@ -1115,11 +2495,15 @@ declare namespace ty.outdoor {
|
|
|
1115
2495
|
* 设备绑定
|
|
1116
2496
|
* @public
|
|
1117
2497
|
* @since OutdoorKit 1.1.0
|
|
2498
|
+
* @example Demo
|
|
2499
|
+
* ```tsx
|
|
2500
|
+
* ty.outdoor.createBond({ deviceMac: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2501
|
+
* ```
|
|
1118
2502
|
* @platform iOS Android
|
|
1119
2503
|
*/
|
|
1120
2504
|
export function createBond(params: {
|
|
1121
2505
|
/**
|
|
1122
|
-
* 设备
|
|
2506
|
+
* 设备 MAC 地址(需大写)
|
|
1123
2507
|
* @since OutdoorKit 1.1.0
|
|
1124
2508
|
*/
|
|
1125
2509
|
deviceMac: string
|
|
@@ -1147,11 +2531,15 @@ declare namespace ty.outdoor {
|
|
|
1147
2531
|
* 移除绑定
|
|
1148
2532
|
* @public
|
|
1149
2533
|
* @since OutdoorKit 1.1.0
|
|
2534
|
+
* @example Demo
|
|
2535
|
+
* ```tsx
|
|
2536
|
+
* ty.outdoor.removeBond({ deviceMac: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2537
|
+
* ```
|
|
1150
2538
|
* @platform iOS Android
|
|
1151
2539
|
*/
|
|
1152
2540
|
export function removeBond(params: {
|
|
1153
2541
|
/**
|
|
1154
|
-
* 设备
|
|
2542
|
+
* 设备 MAC 地址(需大写)
|
|
1155
2543
|
* @since OutdoorKit 1.1.0
|
|
1156
2544
|
*/
|
|
1157
2545
|
deviceMac: string
|
|
@@ -1179,11 +2567,15 @@ declare namespace ty.outdoor {
|
|
|
1179
2567
|
* 是否已绑定
|
|
1180
2568
|
* @public
|
|
1181
2569
|
* @since OutdoorKit 1.1.0
|
|
2570
|
+
* @example Demo
|
|
2571
|
+
* ```tsx
|
|
2572
|
+
* ty.outdoor.isBond({ deviceMac: "xx", success: data => { console.log(data); }, fail: error => { console.error(error); } });
|
|
2573
|
+
* ```
|
|
1182
2574
|
* @platform iOS Android
|
|
1183
2575
|
*/
|
|
1184
2576
|
export function isBond(params: {
|
|
1185
2577
|
/**
|
|
1186
|
-
* 设备
|
|
2578
|
+
* 设备 MAC 地址(需大写)
|
|
1187
2579
|
* @since OutdoorKit 1.1.0
|
|
1188
2580
|
*/
|
|
1189
2581
|
deviceMac: string
|
|
@@ -1208,9 +2600,47 @@ declare namespace ty.outdoor {
|
|
|
1208
2600
|
}): void
|
|
1209
2601
|
|
|
1210
2602
|
/**
|
|
1211
|
-
*
|
|
2603
|
+
* 注册文件下载进度监听(事件体 DownloadProgressEvent,通过 downloadProgress 事件推送)
|
|
2604
|
+
* @public
|
|
2605
|
+
* @since OutdoorKit 7.8.0
|
|
2606
|
+
* @example Demo
|
|
2607
|
+
* ```tsx
|
|
2608
|
+
* ty.outdoor.downloadProgress(e => {
|
|
2609
|
+
* console.log(e);
|
|
2610
|
+
* });
|
|
2611
|
+
* ```
|
|
2612
|
+
* @platform iOS Android
|
|
2613
|
+
*/
|
|
2614
|
+
export function onRegisterDownloadProgress(
|
|
2615
|
+
listener: (params: {
|
|
2616
|
+
/**
|
|
2617
|
+
* 远端文件路径
|
|
2618
|
+
* @since OutdoorKit 7.8.0
|
|
2619
|
+
*/
|
|
2620
|
+
remotePath: string
|
|
2621
|
+
/**
|
|
2622
|
+
* 下载进度 0~100
|
|
2623
|
+
* @since OutdoorKit 7.8.0
|
|
2624
|
+
*/
|
|
2625
|
+
progress: number
|
|
2626
|
+
/**
|
|
2627
|
+
* 下载状态:downloading/completed/failed
|
|
2628
|
+
* @since OutdoorKit 7.8.0
|
|
2629
|
+
*/
|
|
2630
|
+
status: string
|
|
2631
|
+
}) => void
|
|
2632
|
+
): void
|
|
2633
|
+
|
|
2634
|
+
/**
|
|
2635
|
+
* 注册当前首页展示设备变化监听,设备切换时回调最新设备信息
|
|
1212
2636
|
* @public
|
|
1213
2637
|
* @since OutdoorKit 1.1.8
|
|
2638
|
+
* @example Demo
|
|
2639
|
+
* ```tsx
|
|
2640
|
+
* ty.outdoor.currentDeviceChange(e => {
|
|
2641
|
+
* console.log(e);
|
|
2642
|
+
* });
|
|
2643
|
+
* ```
|
|
1214
2644
|
* @platform iOS Android
|
|
1215
2645
|
*/
|
|
1216
2646
|
export function onRegisterCurrentDeviceChange(
|
|
@@ -1224,9 +2654,20 @@ declare namespace ty.outdoor {
|
|
|
1224
2654
|
): void
|
|
1225
2655
|
|
|
1226
2656
|
/**
|
|
1227
|
-
*
|
|
2657
|
+
* 取消当前首页展示设备变化监听
|
|
1228
2658
|
* @public
|
|
1229
2659
|
* @since OutdoorKit 1.1.8
|
|
2660
|
+
* @example Demo
|
|
2661
|
+
* ```tsx
|
|
2662
|
+
* ty.outdoor.offRegisterCurrentDeviceChange({
|
|
2663
|
+
* success: data => {
|
|
2664
|
+
* console.log(data);
|
|
2665
|
+
* },
|
|
2666
|
+
* fail: error => {
|
|
2667
|
+
* console.error(error);
|
|
2668
|
+
* },
|
|
2669
|
+
* });
|
|
2670
|
+
* ```
|
|
1230
2671
|
* @platform iOS Android
|
|
1231
2672
|
*/
|
|
1232
2673
|
export function offRegisterCurrentDeviceChange(
|
|
@@ -1240,9 +2681,15 @@ declare namespace ty.outdoor {
|
|
|
1240
2681
|
): void
|
|
1241
2682
|
|
|
1242
2683
|
/**
|
|
1243
|
-
*
|
|
2684
|
+
* 注册扩展模组插拔状态监听,模组插入或拔出时回调
|
|
1244
2685
|
* @public
|
|
1245
2686
|
* @since OutdoorKit 1.1.6
|
|
2687
|
+
* @example Demo
|
|
2688
|
+
* ```tsx
|
|
2689
|
+
* ty.outdoor.extModuleStatusChange(e => {
|
|
2690
|
+
* console.log(e);
|
|
2691
|
+
* });
|
|
2692
|
+
* ```
|
|
1246
2693
|
* @platform iOS Android
|
|
1247
2694
|
*/
|
|
1248
2695
|
export function onRegisterExtModuleStatus(
|
|
@@ -1253,7 +2700,7 @@ declare namespace ty.outdoor {
|
|
|
1253
2700
|
*/
|
|
1254
2701
|
devID: string
|
|
1255
2702
|
/**
|
|
1256
|
-
*
|
|
2703
|
+
* 扩展模组状态 1:插入模组 0:拔出模组
|
|
1257
2704
|
* @since OutdoorKit 1.1.1
|
|
1258
2705
|
*/
|
|
1259
2706
|
status: number
|
|
@@ -1261,9 +2708,20 @@ declare namespace ty.outdoor {
|
|
|
1261
2708
|
): void
|
|
1262
2709
|
|
|
1263
2710
|
/**
|
|
1264
|
-
*
|
|
2711
|
+
* 取消扩展模组插拔状态监听
|
|
1265
2712
|
* @public
|
|
1266
2713
|
* @since OutdoorKit 1.1.6
|
|
2714
|
+
* @example Demo
|
|
2715
|
+
* ```tsx
|
|
2716
|
+
* ty.outdoor.offRegisterExtModuleStatus({
|
|
2717
|
+
* success: data => {
|
|
2718
|
+
* console.log(data);
|
|
2719
|
+
* },
|
|
2720
|
+
* fail: error => {
|
|
2721
|
+
* console.error(error);
|
|
2722
|
+
* },
|
|
2723
|
+
* });
|
|
2724
|
+
* ```
|
|
1267
2725
|
* @platform iOS Android
|
|
1268
2726
|
*/
|
|
1269
2727
|
export function offRegisterExtModuleStatus(
|
|
@@ -1274,13 +2732,457 @@ declare namespace ty.outdoor {
|
|
|
1274
2732
|
*/
|
|
1275
2733
|
devID: string
|
|
1276
2734
|
/**
|
|
1277
|
-
*
|
|
2735
|
+
* 扩展模组状态 1:插入模组 0:拔出模组
|
|
1278
2736
|
* @since OutdoorKit 1.1.1
|
|
1279
2737
|
*/
|
|
1280
2738
|
status: number
|
|
1281
2739
|
}) => void
|
|
1282
2740
|
): void
|
|
1283
2741
|
|
|
2742
|
+
/**
|
|
2743
|
+
* SDK 初始化参数
|
|
2744
|
+
* @since OutdoorKit 7.8.0
|
|
2745
|
+
*/
|
|
2746
|
+
export interface InitSDKParams {
|
|
2747
|
+
/**
|
|
2748
|
+
* 密钥文件路径
|
|
2749
|
+
* @since OutdoorKit 7.8.0
|
|
2750
|
+
*/
|
|
2751
|
+
keyPath: string
|
|
2752
|
+
/**
|
|
2753
|
+
* 日志输出目录
|
|
2754
|
+
* @since OutdoorKit 7.8.0
|
|
2755
|
+
*/
|
|
2756
|
+
loggerDir: string
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* 摄像头信息返回模型
|
|
2761
|
+
* @since OutdoorKit 7.8.0
|
|
2762
|
+
*/
|
|
2763
|
+
export interface CameraInfoResponse {
|
|
2764
|
+
/**
|
|
2765
|
+
* 设备序列号
|
|
2766
|
+
* @since OutdoorKit 7.8.0
|
|
2767
|
+
*/
|
|
2768
|
+
sn: string
|
|
2769
|
+
/**
|
|
2770
|
+
* 产品编号
|
|
2771
|
+
* @since OutdoorKit 7.8.0
|
|
2772
|
+
*/
|
|
2773
|
+
pn: string
|
|
2774
|
+
/**
|
|
2775
|
+
* SKU 编码
|
|
2776
|
+
* @since OutdoorKit 7.8.0
|
|
2777
|
+
*/
|
|
2778
|
+
sku: string
|
|
2779
|
+
/**
|
|
2780
|
+
* 当前固件版本
|
|
2781
|
+
* @since OutdoorKit 7.8.0
|
|
2782
|
+
*/
|
|
2783
|
+
firmwareVersion: string
|
|
2784
|
+
/**
|
|
2785
|
+
* 绑定状态:0=未绑定, 1=已绑定
|
|
2786
|
+
* @since OutdoorKit 7.8.0
|
|
2787
|
+
*/
|
|
2788
|
+
isBind: number
|
|
2789
|
+
/**
|
|
2790
|
+
* 剩余存储空间(字节)
|
|
2791
|
+
* @since OutdoorKit 7.8.0
|
|
2792
|
+
*/
|
|
2793
|
+
freeSpace: number
|
|
2794
|
+
/**
|
|
2795
|
+
* 总存储空间(字节)
|
|
2796
|
+
* @since OutdoorKit 7.8.0
|
|
2797
|
+
*/
|
|
2798
|
+
totalSpace: number
|
|
2799
|
+
/**
|
|
2800
|
+
* 已用存储空间(字节)
|
|
2801
|
+
* @since OutdoorKit 7.8.0
|
|
2802
|
+
*/
|
|
2803
|
+
usedSpace: number
|
|
2804
|
+
/**
|
|
2805
|
+
* RTSP 服务状态:0=关闭, 1=开启
|
|
2806
|
+
* @since OutdoorKit 7.8.0
|
|
2807
|
+
*/
|
|
2808
|
+
rtspStatus: number
|
|
2809
|
+
/**
|
|
2810
|
+
* 当前帧率(单位 fps)
|
|
2811
|
+
* @since OutdoorKit 7.8.0
|
|
2812
|
+
*/
|
|
2813
|
+
fps: number
|
|
2814
|
+
/**
|
|
2815
|
+
* 当前码率(单位 kbps)
|
|
2816
|
+
* @since OutdoorKit 7.8.0
|
|
2817
|
+
*/
|
|
2818
|
+
bitRate: number
|
|
2819
|
+
/**
|
|
2820
|
+
* 当前录制分段间隔(单位:秒)
|
|
2821
|
+
* @since OutdoorKit 7.8.0
|
|
2822
|
+
*/
|
|
2823
|
+
recordInterval: number
|
|
2824
|
+
/**
|
|
2825
|
+
* AI 功能状态:0=关闭, 1=开启
|
|
2826
|
+
* @since OutdoorKit 7.8.0
|
|
2827
|
+
*/
|
|
2828
|
+
aiEnabled: number
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
/**
|
|
2832
|
+
* WiFi 配置参数
|
|
2833
|
+
* @since OutdoorKit 7.8.0
|
|
2834
|
+
*/
|
|
2835
|
+
export interface SetWifiParams {
|
|
2836
|
+
/**
|
|
2837
|
+
* WiFi 名称
|
|
2838
|
+
* @since OutdoorKit 7.8.0
|
|
2839
|
+
*/
|
|
2840
|
+
ssid: string
|
|
2841
|
+
/**
|
|
2842
|
+
* WiFi 密码
|
|
2843
|
+
* @since OutdoorKit 7.8.0
|
|
2844
|
+
*/
|
|
2845
|
+
password: string
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
/**
|
|
2849
|
+
* 设置帧率参数
|
|
2850
|
+
* @since OutdoorKit 7.8.0
|
|
2851
|
+
*/
|
|
2852
|
+
export interface SetFPSParams {
|
|
2853
|
+
/**
|
|
2854
|
+
* 帧率值,支持 25 或 30
|
|
2855
|
+
* @since OutdoorKit 7.8.0
|
|
2856
|
+
*/
|
|
2857
|
+
fps: number
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
/**
|
|
2861
|
+
* 帧率返回模型
|
|
2862
|
+
* @since OutdoorKit 7.8.0
|
|
2863
|
+
*/
|
|
2864
|
+
export interface FPSResponse {
|
|
2865
|
+
/**
|
|
2866
|
+
* 当前帧率(单位 fps,通常为 25 或 30)
|
|
2867
|
+
* @since OutdoorKit 7.8.0
|
|
2868
|
+
*/
|
|
2869
|
+
fps: number
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
/**
|
|
2873
|
+
* 设置码率参数
|
|
2874
|
+
* @since OutdoorKit 7.8.0
|
|
2875
|
+
*/
|
|
2876
|
+
export interface SetBitRateParams {
|
|
2877
|
+
/**
|
|
2878
|
+
* 码率值(单位 kbps)
|
|
2879
|
+
* @since OutdoorKit 7.8.0
|
|
2880
|
+
*/
|
|
2881
|
+
bitRate: number
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* 码率返回模型
|
|
2886
|
+
* @since OutdoorKit 7.8.0
|
|
2887
|
+
*/
|
|
2888
|
+
export interface BitRateResponse {
|
|
2889
|
+
/**
|
|
2890
|
+
* 当前码率(单位 kbps)
|
|
2891
|
+
* @since OutdoorKit 7.8.0
|
|
2892
|
+
*/
|
|
2893
|
+
bitRate: number
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
/**
|
|
2897
|
+
* 设置录制间隔参数
|
|
2898
|
+
* @since OutdoorKit 7.8.0
|
|
2899
|
+
*/
|
|
2900
|
+
export interface SetRecordIntervalParams {
|
|
2901
|
+
/**
|
|
2902
|
+
* 录制间隔,支持 60/120/180/300(秒)
|
|
2903
|
+
* @since OutdoorKit 7.8.0
|
|
2904
|
+
*/
|
|
2905
|
+
interval: number
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
/**
|
|
2909
|
+
* 录制间隔返回模型
|
|
2910
|
+
* @since OutdoorKit 7.8.0
|
|
2911
|
+
*/
|
|
2912
|
+
export interface RecordIntervalResponse {
|
|
2913
|
+
/**
|
|
2914
|
+
* 当前录制间隔(秒)
|
|
2915
|
+
* @since OutdoorKit 7.8.0
|
|
2916
|
+
*/
|
|
2917
|
+
interval: number
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
/**
|
|
2921
|
+
* 设置 AI 功能参数
|
|
2922
|
+
* @since OutdoorKit 7.8.0
|
|
2923
|
+
*/
|
|
2924
|
+
export interface SetAIEnabledParams {
|
|
2925
|
+
/**
|
|
2926
|
+
* AI 功能开关:0=关闭, 1=开启
|
|
2927
|
+
* @since OutdoorKit 7.8.0
|
|
2928
|
+
*/
|
|
2929
|
+
enabled: number
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
/**
|
|
2933
|
+
* AI 功能状态返回模型
|
|
2934
|
+
* @since OutdoorKit 7.8.0
|
|
2935
|
+
*/
|
|
2936
|
+
export interface AIStatusResponse {
|
|
2937
|
+
/**
|
|
2938
|
+
* AI 功能状态:0=关闭, 1=开启
|
|
2939
|
+
* @since OutdoorKit 7.8.0
|
|
2940
|
+
*/
|
|
2941
|
+
enabled: number
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2944
|
+
/**
|
|
2945
|
+
* 固件版本信息返回模型
|
|
2946
|
+
* @since OutdoorKit 7.8.0
|
|
2947
|
+
*/
|
|
2948
|
+
export interface FirmwareInfoResponse {
|
|
2949
|
+
/**
|
|
2950
|
+
* 当前固件版本号
|
|
2951
|
+
* @since OutdoorKit 7.8.0
|
|
2952
|
+
*/
|
|
2953
|
+
currentVersion: string
|
|
2954
|
+
/**
|
|
2955
|
+
* 是否有可用更新:0=无, 1=有
|
|
2956
|
+
* @since OutdoorKit 7.8.0
|
|
2957
|
+
*/
|
|
2958
|
+
hasUpdate: number
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2961
|
+
/**
|
|
2962
|
+
* 固件升级参数
|
|
2963
|
+
* @since OutdoorKit 7.8.0
|
|
2964
|
+
*/
|
|
2965
|
+
export interface UpgradeFirmwareParams {
|
|
2966
|
+
/**
|
|
2967
|
+
* 固件文件路径
|
|
2968
|
+
* @since OutdoorKit 7.8.0
|
|
2969
|
+
*/
|
|
2970
|
+
firmwarePath: string
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2973
|
+
/**
|
|
2974
|
+
* 通用路径参数
|
|
2975
|
+
* @since OutdoorKit 7.8.0
|
|
2976
|
+
*/
|
|
2977
|
+
export interface PathParam {
|
|
2978
|
+
/**
|
|
2979
|
+
* 目标路径
|
|
2980
|
+
* @since OutdoorKit 7.8.0
|
|
2981
|
+
*/
|
|
2982
|
+
path: string
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
/**
|
|
2986
|
+
* 文件项
|
|
2987
|
+
* @since OutdoorKit 7.8.0
|
|
2988
|
+
*/
|
|
2989
|
+
export interface FileItem {
|
|
2990
|
+
/**
|
|
2991
|
+
* 文件名称
|
|
2992
|
+
* @since OutdoorKit 7.8.0
|
|
2993
|
+
*/
|
|
2994
|
+
name: string
|
|
2995
|
+
/**
|
|
2996
|
+
* 文件完整路径
|
|
2997
|
+
* @since OutdoorKit 7.8.0
|
|
2998
|
+
*/
|
|
2999
|
+
path: string
|
|
3000
|
+
/**
|
|
3001
|
+
* 文件大小(字节)
|
|
3002
|
+
* @since OutdoorKit 7.8.0
|
|
3003
|
+
*/
|
|
3004
|
+
size: number
|
|
3005
|
+
/**
|
|
3006
|
+
* 最后修改时间(ISO 时间字符串)
|
|
3007
|
+
* @since OutdoorKit 7.8.0
|
|
3008
|
+
*/
|
|
3009
|
+
lastChanged: string
|
|
3010
|
+
/**
|
|
3011
|
+
* 文件类型:0=普通文件, 1=目录
|
|
3012
|
+
* @since OutdoorKit 7.8.0
|
|
3013
|
+
*/
|
|
3014
|
+
isDir: number
|
|
3015
|
+
/**
|
|
3016
|
+
* 设备侧 HTTP 播放地址(与 RideSafe 列表 JSON 中 remote_url 对应;可能为空字符串)
|
|
3017
|
+
* @since OutdoorKit 7.8.0
|
|
3018
|
+
*/
|
|
3019
|
+
remoteUrl: string
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
/**
|
|
3023
|
+
* 获取下载/在线播放鉴权头返回模型(info.header,供播放器 HTTP Header 使用)
|
|
3024
|
+
* @since OutdoorKit 7.8.0
|
|
3025
|
+
*/
|
|
3026
|
+
export interface DownloadAuthHeaderResponse {
|
|
3027
|
+
/**
|
|
3028
|
+
* 鉴权头原始字符串(多行 key: value,与肇观 Demo getHeader 一致)
|
|
3029
|
+
* @since OutdoorKit 7.8.0
|
|
3030
|
+
*/
|
|
3031
|
+
header: string
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
/**
|
|
3035
|
+
* 文件列表返回模型
|
|
3036
|
+
* @since OutdoorKit 7.8.0
|
|
3037
|
+
*/
|
|
3038
|
+
export interface FileListResponse {
|
|
3039
|
+
/**
|
|
3040
|
+
* 文件列表
|
|
3041
|
+
* @since OutdoorKit 7.8.0
|
|
3042
|
+
*/
|
|
3043
|
+
files: FileItem[]
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
/**
|
|
3047
|
+
* 文件下载参数
|
|
3048
|
+
* @since OutdoorKit 7.8.0
|
|
3049
|
+
*/
|
|
3050
|
+
export interface DownloadFileParams {
|
|
3051
|
+
/**
|
|
3052
|
+
* 远端文件路径
|
|
3053
|
+
* @since OutdoorKit 7.8.0
|
|
3054
|
+
*/
|
|
3055
|
+
remotePath: string
|
|
3056
|
+
/**
|
|
3057
|
+
* 本地存储路径
|
|
3058
|
+
* @since OutdoorKit 7.8.0
|
|
3059
|
+
*/
|
|
3060
|
+
localPath: string
|
|
3061
|
+
/**
|
|
3062
|
+
* 可选:文件大小(字节),与 getFileList 中 FileItem.size 一致时可传,用于下载后校验与 post_verify 阶段进度。
|
|
3063
|
+
* @since OutdoorKit 7.8.0
|
|
3064
|
+
*/
|
|
3065
|
+
fileSizeBytes?: number
|
|
3066
|
+
/**
|
|
3067
|
+
* Android-only: 下载完成后是否将文件额外导出到系统公共 Downloads 目录(Download/nvpdownload/<name>)。
|
|
3068
|
+
* 默认 true,Android 上会把文件同时写入用户可见的 Downloads 目录(与 Sample 的列表下载一致);传 false 则仅保留到 localPath(应用私有缓存)。
|
|
3069
|
+
* iOS / HarmonyOS 当前不实现该行为,字段仅为多端对齐预留。
|
|
3070
|
+
* @since OutdoorKit 7.8.0
|
|
3071
|
+
*/
|
|
3072
|
+
exportToPublicDownloads?: boolean
|
|
3073
|
+
/**
|
|
3074
|
+
* Android-only: 成功导出到公共 Downloads 后,是否删除 localPath 指向的原始副本。
|
|
3075
|
+
* 不传(默认)时使用智能策略:未传 localPath(由 lib 自动生成 cache 路径)→ 删除;传了 localPath → 保留。
|
|
3076
|
+
* 显式传 true/false 会覆盖默认策略。export 失败或关闭时永不删除。
|
|
3077
|
+
* @since OutdoorKit 7.8.0
|
|
3078
|
+
*/
|
|
3079
|
+
deleteLocalAfterExport?: boolean
|
|
3080
|
+
}
|
|
3081
|
+
|
|
3082
|
+
/**
|
|
3083
|
+
* 批量删除文件参数
|
|
3084
|
+
* @since OutdoorKit 7.8.0
|
|
3085
|
+
*/
|
|
3086
|
+
export interface DeleteFilesParams {
|
|
3087
|
+
/**
|
|
3088
|
+
* 待删除文件路径列表
|
|
3089
|
+
* @since OutdoorKit 7.8.0
|
|
3090
|
+
*/
|
|
3091
|
+
paths: string[]
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
/**
|
|
3095
|
+
* 批量删除文件返回模型
|
|
3096
|
+
* @since OutdoorKit 7.8.0
|
|
3097
|
+
*/
|
|
3098
|
+
export interface DeleteFilesResponse {
|
|
3099
|
+
/**
|
|
3100
|
+
* 成功删除的文件数量
|
|
3101
|
+
* @since OutdoorKit 7.8.0
|
|
3102
|
+
*/
|
|
3103
|
+
deletedCount: number
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
/**
|
|
3107
|
+
* 存储空间信息返回模型
|
|
3108
|
+
* @since OutdoorKit 7.8.0
|
|
3109
|
+
*/
|
|
3110
|
+
export interface FreeSpaceResponse {
|
|
3111
|
+
/**
|
|
3112
|
+
* 可用空间(字节)
|
|
3113
|
+
* @since OutdoorKit 7.8.0
|
|
3114
|
+
*/
|
|
3115
|
+
free: number
|
|
3116
|
+
/**
|
|
3117
|
+
* 已用空间(字节)
|
|
3118
|
+
* @since OutdoorKit 7.8.0
|
|
3119
|
+
*/
|
|
3120
|
+
used: number
|
|
3121
|
+
/**
|
|
3122
|
+
* 总空间(字节)
|
|
3123
|
+
* @since OutdoorKit 7.8.0
|
|
3124
|
+
*/
|
|
3125
|
+
total: number
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
/**
|
|
3129
|
+
* 文件下载进度事件数据
|
|
3130
|
+
* @since OutdoorKit 7.8.0
|
|
3131
|
+
*/
|
|
3132
|
+
export interface DownloadProgressEvent {
|
|
3133
|
+
/**
|
|
3134
|
+
* 远端文件路径
|
|
3135
|
+
* @since OutdoorKit 7.8.0
|
|
3136
|
+
*/
|
|
3137
|
+
remotePath: string
|
|
3138
|
+
/**
|
|
3139
|
+
* 下载进度 0~100
|
|
3140
|
+
* @since OutdoorKit 7.8.0
|
|
3141
|
+
*/
|
|
3142
|
+
progress: number
|
|
3143
|
+
/**
|
|
3144
|
+
* 下载状态:downloading/completed/failed
|
|
3145
|
+
* @since OutdoorKit 7.8.0
|
|
3146
|
+
*/
|
|
3147
|
+
status: string
|
|
3148
|
+
}
|
|
3149
|
+
|
|
3150
|
+
/**
|
|
3151
|
+
* 视频播放参数
|
|
3152
|
+
* @since OutdoorKit 7.8.0
|
|
3153
|
+
*/
|
|
3154
|
+
export interface PlayVideoParams {
|
|
3155
|
+
/**
|
|
3156
|
+
* 视频播放地址(远端 HTTP 流地址或本地文件路径,鉴权头由原生内部自动获取)
|
|
3157
|
+
* @since OutdoorKit 7.8.0
|
|
3158
|
+
*/
|
|
3159
|
+
url: string
|
|
3160
|
+
/**
|
|
3161
|
+
* 可选:文件大小(字节),与 getFileList 中 FileItem.size 一致时可传。
|
|
3162
|
+
* 当 ExoPlayer 无法从容器头取到 duration(NVP 设备 TS 流常见)时,用字节数 + 估算码率推导合理的总时长与进度条范围;
|
|
3163
|
+
* 不传则播放总时长可能显示异常、进度条无法拖动(与 Sample 列表播放保持一致即不会出现该问题)。
|
|
3164
|
+
* @since OutdoorKit 7.8.0
|
|
3165
|
+
*/
|
|
3166
|
+
fileSizeBytes?: number
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* 一键连接设备参数
|
|
3171
|
+
* @since OutdoorKit 7.8.0
|
|
3172
|
+
*/
|
|
3173
|
+
export interface ConnectDeviceParams {
|
|
3174
|
+
/**
|
|
3175
|
+
* 设备热点 SSID
|
|
3176
|
+
* @since OutdoorKit 7.8.0
|
|
3177
|
+
*/
|
|
3178
|
+
ssid: string
|
|
3179
|
+
/**
|
|
3180
|
+
* 设备热点密码
|
|
3181
|
+
* @since OutdoorKit 7.8.0
|
|
3182
|
+
*/
|
|
3183
|
+
password: string
|
|
3184
|
+
}
|
|
3185
|
+
|
|
1284
3186
|
/**
|
|
1285
3187
|
* 设备
|
|
1286
3188
|
* @since OutdoorKit 1.0.0
|
|
@@ -1396,12 +3298,12 @@ declare namespace ty.outdoor {
|
|
|
1396
3298
|
*/
|
|
1397
3299
|
weather: boolean
|
|
1398
3300
|
/**
|
|
1399
|
-
*
|
|
3301
|
+
* 异常佩戴播报开关
|
|
1400
3302
|
* @since OutdoorKit 1.0.1
|
|
1401
3303
|
*/
|
|
1402
3304
|
abnormalWear: boolean
|
|
1403
3305
|
/**
|
|
1404
|
-
*
|
|
3306
|
+
* 骑行里程播报开关
|
|
1405
3307
|
* @since OutdoorKit 1.0.1
|
|
1406
3308
|
*/
|
|
1407
3309
|
cyclingMileage: boolean
|
|
@@ -1411,12 +3313,12 @@ declare namespace ty.outdoor {
|
|
|
1411
3313
|
*/
|
|
1412
3314
|
lowBattery: boolean
|
|
1413
3315
|
/**
|
|
1414
|
-
*
|
|
3316
|
+
* 低电量播报阈值,电量低于该百分比时触发播报
|
|
1415
3317
|
* @since OutdoorKit 1.0.1
|
|
1416
3318
|
*/
|
|
1417
3319
|
electricThreshold: number
|
|
1418
3320
|
/**
|
|
1419
|
-
*
|
|
3321
|
+
* 来电提醒播报开关
|
|
1420
3322
|
* @since OutdoorKit 1.0.1
|
|
1421
3323
|
*/
|
|
1422
3324
|
callReminder: boolean
|
|
@@ -1428,17 +3330,17 @@ declare namespace ty.outdoor {
|
|
|
1428
3330
|
*/
|
|
1429
3331
|
export interface ExtendedModuleExtConfig {
|
|
1430
3332
|
/**
|
|
1431
|
-
* auto_active
|
|
3333
|
+
* 激活方式,取值:auto_active(自动激活)/ manual_active(手动激活)
|
|
1432
3334
|
* @since OutdoorKit 1.1.0
|
|
1433
3335
|
*/
|
|
1434
3336
|
activeType: string
|
|
1435
3337
|
/**
|
|
1436
|
-
* disabled
|
|
3338
|
+
* 未激活时的交互方式,取值:disabled(置灰禁用)/ hide(隐藏)
|
|
1437
3339
|
* @since OutdoorKit 1.1.0
|
|
1438
3340
|
*/
|
|
1439
3341
|
interactionType: string
|
|
1440
3342
|
/**
|
|
1441
|
-
*
|
|
3343
|
+
* 关联的 dpID 列表
|
|
1442
3344
|
* @since OutdoorKit 1.1.0
|
|
1443
3345
|
*/
|
|
1444
3346
|
assocaitedDps: number[]
|
|
@@ -1450,7 +3352,7 @@ declare namespace ty.outdoor {
|
|
|
1450
3352
|
*/
|
|
1451
3353
|
export interface MapResponse {
|
|
1452
3354
|
/**
|
|
1453
|
-
*
|
|
3355
|
+
* 透传结果字典,键值对内容由业务侧定义
|
|
1454
3356
|
* @since OutdoorKit 1.1.0
|
|
1455
3357
|
*/
|
|
1456
3358
|
result: Record<any, any>
|
|
@@ -1484,7 +3386,7 @@ declare namespace ty.outdoor {
|
|
|
1484
3386
|
*/
|
|
1485
3387
|
devID: string
|
|
1486
3388
|
/**
|
|
1487
|
-
*
|
|
3389
|
+
* 扩展模组状态 1:插入模组 0:拔出模组
|
|
1488
3390
|
* @since OutdoorKit 1.1.1
|
|
1489
3391
|
*/
|
|
1490
3392
|
status: number
|
|
@@ -1496,7 +3398,7 @@ declare namespace ty.outdoor {
|
|
|
1496
3398
|
*/
|
|
1497
3399
|
export interface DeviceBean {
|
|
1498
3400
|
/**
|
|
1499
|
-
* 设备
|
|
3401
|
+
* 设备 ID
|
|
1500
3402
|
* @since OutdoorKit 1.1.0
|
|
1501
3403
|
*/
|
|
1502
3404
|
deviceID: string
|
|
@@ -1508,7 +3410,7 @@ declare namespace ty.outdoor {
|
|
|
1508
3410
|
*/
|
|
1509
3411
|
export interface InductiveUnlockBean {
|
|
1510
3412
|
/**
|
|
1511
|
-
*
|
|
3413
|
+
* 感应解锁类型,按位枚举:InductiveUnlockTypeBLEHID = 1 << 0,InductiveUnlockTypeBT = 1 << 1
|
|
1512
3414
|
* @since OutdoorKit 1.1.0
|
|
1513
3415
|
*/
|
|
1514
3416
|
inductiveUnlockType: number
|
|
@@ -1525,7 +3427,7 @@ declare namespace ty.outdoor {
|
|
|
1525
3427
|
*/
|
|
1526
3428
|
deviceID: string
|
|
1527
3429
|
/**
|
|
1528
|
-
*
|
|
3430
|
+
* 距离档位(可选值 1、2、3)
|
|
1529
3431
|
* @since OutdoorKit 1.1.0
|
|
1530
3432
|
*/
|
|
1531
3433
|
distance: number
|
|
@@ -1537,7 +3439,7 @@ declare namespace ty.outdoor {
|
|
|
1537
3439
|
*/
|
|
1538
3440
|
export interface DeviceInfo {
|
|
1539
3441
|
/**
|
|
1540
|
-
* 设备
|
|
3442
|
+
* 设备 MAC 地址(需大写)
|
|
1541
3443
|
* @since OutdoorKit 1.1.0
|
|
1542
3444
|
*/
|
|
1543
3445
|
deviceMac: string
|