@ray-js/api 1.6.0-beta.9 → 1.6.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 +837 -37
- package/@types/BizKit.d.ts +1831 -85
- package/@types/DeviceKit.d.ts +581 -58
- package/@types/HomeKit.d.ts +0 -74
- package/@types/MiniKit.d.ts +411 -8
- package/@types/api-cloud.d.ts +145 -0
- package/@types/api-extend.d.ts +42 -10
- package/@types/api.d.ts +3 -0
- package/@types/gateway.d.ts +146 -0
- package/@types/health.d.ts +309 -0
- package/lib/{BaseKit-3.11.0.d.ts → BaseKit-3.14.3.d.ts} +29 -1
- package/lib/{BaseKit-3.11.0.js → BaseKit-3.14.3.js} +32 -1
- package/lib/BizKit-4.10.4.d.ts +84 -0
- package/lib/{BizKit-3.2.7.js → BizKit-4.10.4.js} +46 -5
- package/lib/{DeviceKit-3.3.1.d.ts → DeviceKit-4.9.0.d.ts} +22 -1
- package/lib/{DeviceKit-3.3.1.js → DeviceKit-4.9.0.js} +66 -0
- package/lib/HomeKit-3.1.4.d.ts +0 -1
- package/lib/MapKit-3.4.13.d.ts +0 -1
- package/lib/{MiniKit-3.1.0.d.ts → MiniKit-3.12.1.d.ts} +11 -1
- package/lib/{MiniKit-3.1.0.js → MiniKit-3.12.1.js} +12 -1
- package/lib/OutdoorKit-1.0.4.d.ts +0 -1
- package/lib/P2PKit-2.0.3.d.ts +0 -1
- package/lib/PlayNetKit-1.1.3.d.ts +24 -24
- package/lib/all-kits.d.ts +5 -5
- package/lib/all-kits.js +5 -5
- package/lib/cloud/device.d.ts +3 -3
- package/lib/cloud/gateway.d.ts +11 -0
- package/lib/cloud/gateway.js +39 -0
- package/lib/cloud/health.d.ts +19 -0
- package/lib/cloud/health.js +71 -0
- package/lib/cloud/index.d.ts +3 -0
- package/lib/cloud/index.js +6 -1
- package/lib/cloud/interface.d.ts +40 -1
- package/lib/cloud/laser-clean/index.d.ts +3 -0
- package/lib/cloud/laser-clean/index.js +3 -0
- package/lib/cloud/laser-clean/map.d.ts +3 -0
- package/lib/cloud/laser-clean/map.js +4 -0
- package/lib/cloud/laser-clean/record.d.ts +3 -0
- package/lib/cloud/laser-clean/record.js +4 -0
- package/lib/cloud/laser-clean/voice.d.ts +2 -0
- package/lib/cloud/laser-clean/voice.js +3 -0
- package/lib/cloud/recipe/basket.js +1 -0
- package/lib/cloud/recipe/custom.js +1 -0
- package/lib/cloud/recipe/menu.js +1 -0
- package/lib/cloud/recipe/query.js +1 -0
- package/lib/cloud/recipe/score.js +1 -0
- package/lib/cloud/recipe/star.js +1 -0
- package/lib/getBoundingClientRect/index.thing.js +1 -0
- package/lib/getBoundingClientRect/index.wechat.js +1 -0
- package/lib/getCdnUrl/index.thing.js +13 -8
- package/lib/hideTabBar/index.d.ts +4 -5
- package/lib/index.d.ts +0 -1
- package/lib/navigateBack/index.d.ts +0 -1
- package/lib/navigateTo/index.d.ts +0 -1
- package/lib/panel/devInfo/index.js +7 -1
- package/lib/panel/i18n/index.js +4 -0
- package/lib/panel/i18n/index.wechat.js +4 -0
- package/lib/panel/publishDps.js +2 -0
- package/lib/reLaunch/index.d.ts +0 -1
- package/lib/redirectTo/index.d.ts +0 -1
- package/lib/redirectTo/index.js +1 -0
- package/lib/requestCloud/index.d.ts +0 -1
- package/lib/setNavigationBarColor/index.d.ts +0 -1
- package/lib/setNavigationBarTitle/index.d.ts +0 -1
- package/lib/showTabBar/index.d.ts +4 -5
- package/lib/switchTab/index.d.ts +0 -1
- package/lib/utils.wechat.js +1 -0
- package/lib/viewAPI.d.ts +1 -1
- package/lib/viewAPI.js +2 -1
- package/package.json +8 -8
- package/lib/BizKit-3.2.7.d.ts +0 -46
- package/lib/cloud/doorlock/README.md +0 -62
- package/lib/cloud/doorlock/auth.md +0 -323
- package/lib/cloud/doorlock/device.md +0 -265
- package/lib/cloud/doorlock/log.md +0 -153
- package/lib/cloud/doorlock/member-opmode.md +0 -279
- package/lib/cloud/doorlock/member.md +0 -276
- package/lib/cloud/doorlock/offline-pwd.md +0 -155
- package/lib/cloud/doorlock/temp-pwd.md +0 -362
- package/lib/cloud/doorlock/unlock-method.md +0 -121
- package/lib/cloud/doorlock/unlock.md +0 -222
package/@types/BaseKit.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* BaseKit
|
3
3
|
*
|
4
|
-
* @version 3.
|
4
|
+
* @version 3.14.3
|
5
5
|
*/
|
6
6
|
declare namespace ty {
|
7
7
|
/**
|
@@ -117,19 +117,47 @@ declare namespace ty {
|
|
117
117
|
}) => void
|
118
118
|
}): void
|
119
119
|
|
120
|
+
/**
|
121
|
+
* 获取用户的当前设置。返回值中只会出现小程序已经向用户请求过的权限
|
122
|
+
*/
|
123
|
+
export function getSetting(params?: {
|
124
|
+
complete?: () => void
|
125
|
+
success?: (params: { authSetting: Record<string, boolean> }) => void
|
126
|
+
fail?: (params: {
|
127
|
+
errorMsg: string
|
128
|
+
errorCode: string | number
|
129
|
+
innerError: {
|
130
|
+
errorCode: string | number
|
131
|
+
errorMsg: string
|
132
|
+
}
|
133
|
+
}) => void
|
134
|
+
}): void
|
135
|
+
|
120
136
|
/**
|
121
137
|
* 打开另一个小程序
|
122
138
|
*/
|
123
139
|
export function navigateToMiniProgram(params?: {
|
124
140
|
/** 要打开的小程序appId */
|
125
141
|
appId?: string
|
142
|
+
/** 要打开的智能体小程序的智能体Id */
|
143
|
+
aiPtChannel?: string
|
144
|
+
/**
|
145
|
+
* 要打开的小程序智能体的版本。
|
146
|
+
* preview:体验版
|
147
|
+
* release:正式版
|
148
|
+
*/
|
149
|
+
aiPtType?: string
|
126
150
|
/** 打开的页面路径,如果为空则打开首页,path 中 ? 后面的部分会成为 query,在小程序的 `App.onLaunch`、`App.onShow` 和 `Page.onLoad` 的回调函数 */
|
127
151
|
path?: string
|
128
152
|
/** 打开小程序的转场方式,分为right|bottom,指代水平和竖直方向 */
|
129
153
|
position?: string
|
130
154
|
/** 传递给目标小程序的数据,目标小程序可在 `App.onLaunch`,`App.onShow` 中获取到这份数据 */
|
131
155
|
extraData?: Record<string, any>
|
132
|
-
/**
|
156
|
+
/**
|
157
|
+
* 要打开的小程序版本。仅在当前小程序为开发版或体验版时此参数有效。如果当前小程序是正式版,则打开的小程序必定是正式版
|
158
|
+
* trial:体验版
|
159
|
+
* release:正式版
|
160
|
+
*/
|
133
161
|
envVersion?: string
|
134
162
|
/** 小程序链接,当传递该参数后,可以不传 appId 和 path */
|
135
163
|
shortLink?: string
|
@@ -145,6 +173,88 @@ declare namespace ty {
|
|
145
173
|
}) => void
|
146
174
|
}): void
|
147
175
|
|
176
|
+
/**
|
177
|
+
* 获取视频缩略图
|
178
|
+
*/
|
179
|
+
export function fetchVideoThumbnails(params: {
|
180
|
+
/** 视频文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) */
|
181
|
+
filePath: string
|
182
|
+
/** 开始时间,毫秒 */
|
183
|
+
startTime: number
|
184
|
+
/** 结束时间,毫秒 */
|
185
|
+
endTime: number
|
186
|
+
/** 缩略图个数 */
|
187
|
+
thumbnailCount: number
|
188
|
+
/** 缩略图宽高,期望值 */
|
189
|
+
thumbnailWidth: number
|
190
|
+
/** 缩略图高,期望值 */
|
191
|
+
thumbnailHeight: number
|
192
|
+
complete?: () => void
|
193
|
+
success?: (params: {
|
194
|
+
/** 缩略图路径 */
|
195
|
+
thumbnailsPath?: string[]
|
196
|
+
}) => void
|
197
|
+
fail?: (params: {
|
198
|
+
errorMsg: string
|
199
|
+
errorCode: string | number
|
200
|
+
innerError: {
|
201
|
+
errorCode: string | number
|
202
|
+
errorMsg: string
|
203
|
+
}
|
204
|
+
}) => void
|
205
|
+
}): void
|
206
|
+
|
207
|
+
/**
|
208
|
+
* 清空视频缩略图
|
209
|
+
*/
|
210
|
+
export function clearVideoThumbnails(params: {
|
211
|
+
/** 对应视频文件名称 */
|
212
|
+
videoName: string
|
213
|
+
complete?: () => void
|
214
|
+
success?: (params: null) => void
|
215
|
+
fail?: (params: {
|
216
|
+
errorMsg: string
|
217
|
+
errorCode: string | number
|
218
|
+
innerError: {
|
219
|
+
errorCode: string | number
|
220
|
+
errorMsg: string
|
221
|
+
}
|
222
|
+
}) => void
|
223
|
+
}): void
|
224
|
+
|
225
|
+
/**
|
226
|
+
* 裁剪视频
|
227
|
+
*/
|
228
|
+
export function clipVideo(params: {
|
229
|
+
/** 视频文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) */
|
230
|
+
filePath: string
|
231
|
+
/** 开始时间,毫秒 */
|
232
|
+
startTime: number
|
233
|
+
/** 结束时间,毫秒 */
|
234
|
+
endTime: number
|
235
|
+
/**
|
236
|
+
* 目标压缩的分辨率
|
237
|
+
* 1 - 480*854 码率:1572*1000
|
238
|
+
* 2 - 540*960 码率:2128*1000
|
239
|
+
* 3 - 720*1280 码率:3145*1000
|
240
|
+
* 4 - 1080*1920 码率:3500*1000
|
241
|
+
*/
|
242
|
+
level: number
|
243
|
+
complete?: () => void
|
244
|
+
success?: (params: {
|
245
|
+
/** 裁剪视频路径 */
|
246
|
+
videoClipPath?: string
|
247
|
+
}) => void
|
248
|
+
fail?: (params: {
|
249
|
+
errorMsg: string
|
250
|
+
errorCode: string | number
|
251
|
+
innerError: {
|
252
|
+
errorCode: string | number
|
253
|
+
errorMsg: string
|
254
|
+
}
|
255
|
+
}) => void
|
256
|
+
}): void
|
257
|
+
|
148
258
|
/**
|
149
259
|
* 开始监听罗盘数据
|
150
260
|
*/
|
@@ -252,6 +362,31 @@ declare namespace ty {
|
|
252
362
|
}) => void
|
253
363
|
}): void
|
254
364
|
|
365
|
+
/**
|
366
|
+
* 获取该小程序下的 本地临时文件 或 本地缓存文件 信息
|
367
|
+
*/
|
368
|
+
export function getFileInfo(params: {
|
369
|
+
/** 要读取的文件路径 */
|
370
|
+
filePath: string
|
371
|
+
/** 计算文件摘要的算法, md5/sha1/sha256 默认MD5 */
|
372
|
+
digestAlgorithm: string
|
373
|
+
complete?: () => void
|
374
|
+
success?: (params: {
|
375
|
+
/** 文件大小,字节 */
|
376
|
+
size: number
|
377
|
+
/** 按照传入的 digestAlgorithm 计算得出的的文件摘要 */
|
378
|
+
digest: string
|
379
|
+
}) => void
|
380
|
+
fail?: (params: {
|
381
|
+
errorMsg: string
|
382
|
+
errorCode: string | number
|
383
|
+
innerError: {
|
384
|
+
errorCode: string | number
|
385
|
+
errorMsg: string
|
386
|
+
}
|
387
|
+
}) => void
|
388
|
+
}): void
|
389
|
+
|
255
390
|
/**
|
256
391
|
* 开始监听陀螺仪数据。
|
257
392
|
*/
|
@@ -286,6 +421,115 @@ declare namespace ty {
|
|
286
421
|
}) => void
|
287
422
|
}): void
|
288
423
|
|
424
|
+
/**
|
425
|
+
* 初始化
|
426
|
+
*/
|
427
|
+
export function initializeUploadFile(params: {
|
428
|
+
/** 设备id */
|
429
|
+
deviceId: string
|
430
|
+
complete?: () => void
|
431
|
+
success?: (params: null) => void
|
432
|
+
fail?: (params: {
|
433
|
+
errorMsg: string
|
434
|
+
errorCode: string | number
|
435
|
+
innerError: {
|
436
|
+
errorCode: string | number
|
437
|
+
errorMsg: string
|
438
|
+
}
|
439
|
+
}) => void
|
440
|
+
}): void
|
441
|
+
|
442
|
+
/**
|
443
|
+
* 上传文件
|
444
|
+
*/
|
445
|
+
export function uploadFileToDevice(params: {
|
446
|
+
/** 设备id */
|
447
|
+
deviceId: string
|
448
|
+
/** sid */
|
449
|
+
sid: string
|
450
|
+
/** 上传文件路径列表 */
|
451
|
+
fileList?: string[]
|
452
|
+
/** 扩展字段 */
|
453
|
+
extData?: Object
|
454
|
+
complete?: () => void
|
455
|
+
success?: (params: {
|
456
|
+
/** 任务id */
|
457
|
+
taskId: string
|
458
|
+
}) => void
|
459
|
+
fail?: (params: {
|
460
|
+
errorMsg: string
|
461
|
+
errorCode: string | number
|
462
|
+
innerError: {
|
463
|
+
errorCode: string | number
|
464
|
+
errorMsg: string
|
465
|
+
}
|
466
|
+
}) => void
|
467
|
+
}): void
|
468
|
+
|
469
|
+
/**
|
470
|
+
* 取消上传
|
471
|
+
*/
|
472
|
+
export function cancelUploadFileToDevice(params: {
|
473
|
+
/** 任务id */
|
474
|
+
taskId: string
|
475
|
+
complete?: () => void
|
476
|
+
success?: (params: null) => void
|
477
|
+
fail?: (params: {
|
478
|
+
errorMsg: string
|
479
|
+
errorCode: string | number
|
480
|
+
innerError: {
|
481
|
+
errorCode: string | number
|
482
|
+
errorMsg: string
|
483
|
+
}
|
484
|
+
}) => void
|
485
|
+
}): void
|
486
|
+
|
487
|
+
/**
|
488
|
+
* 压缩图片
|
489
|
+
*/
|
490
|
+
export function compressImage(params: {
|
491
|
+
/** 压缩图片路径列表 */
|
492
|
+
fileList?: string[]
|
493
|
+
/** 压缩图片的目标宽 */
|
494
|
+
dstWidth: number
|
495
|
+
/** 压缩图片的目标高 */
|
496
|
+
dstHeight: number
|
497
|
+
complete?: () => void
|
498
|
+
success?: (params: {
|
499
|
+
/** 压缩完成的图片路径列表 */
|
500
|
+
fileList?: string[]
|
501
|
+
}) => void
|
502
|
+
fail?: (params: {
|
503
|
+
errorMsg: string
|
504
|
+
errorCode: string | number
|
505
|
+
innerError: {
|
506
|
+
errorCode: string | number
|
507
|
+
errorMsg: string
|
508
|
+
}
|
509
|
+
}) => void
|
510
|
+
}): void
|
511
|
+
|
512
|
+
/**
|
513
|
+
* 图片裁剪
|
514
|
+
*/
|
515
|
+
export function cropImages(params?: {
|
516
|
+
/** 裁剪图片的地址 */
|
517
|
+
cropFileList?: CropImageItemBean[]
|
518
|
+
complete?: () => void
|
519
|
+
success?: (params: {
|
520
|
+
/** 裁剪完成的图片路径列表 */
|
521
|
+
fileList?: string[]
|
522
|
+
}) => void
|
523
|
+
fail?: (params: {
|
524
|
+
errorMsg: string
|
525
|
+
errorCode: string | number
|
526
|
+
innerError: {
|
527
|
+
errorCode: string | number
|
528
|
+
errorMsg: string
|
529
|
+
}
|
530
|
+
}) => void
|
531
|
+
}): void
|
532
|
+
|
289
533
|
/**
|
290
534
|
* 从本地相册选择图片或使用相机拍照, 可用chooseMedia替代此方法
|
291
535
|
*
|
@@ -299,6 +543,8 @@ declare namespace ty {
|
|
299
543
|
sizeType?: string[]
|
300
544
|
/** 选择图片的来源 ['album', 'camera'] */
|
301
545
|
sourceType?: string[]
|
546
|
+
/** 是否取消选择图片后关闭界面的动画效果 */
|
547
|
+
disableDismissAnimationAfterSelect?: boolean
|
302
548
|
complete?: () => void
|
303
549
|
success?: (params: {
|
304
550
|
/** 图片的本地临时文件路径列表 (本地路径) */
|
@@ -341,6 +587,30 @@ declare namespace ty {
|
|
341
587
|
* 时间范围为 3s 至 60s 之间。不限制相册。
|
342
588
|
*/
|
343
589
|
maxDuration?: number
|
590
|
+
/**
|
591
|
+
* 该参数只对iOS有效
|
592
|
+
* 是否拷贝视频:
|
593
|
+
* 默认true,拷贝视频,返回视频拷贝地址,返回视频封面地址
|
594
|
+
* false,不拷贝视频,返回视频相册中的地址,返回视频封面图地址
|
595
|
+
*/
|
596
|
+
isFetchVideoFile?: boolean
|
597
|
+
/**
|
598
|
+
* 该参数只对iOS有效
|
599
|
+
* 相册选择的视频是否需要裁剪
|
600
|
+
* 默认为false, 不裁剪视频
|
601
|
+
*/
|
602
|
+
isClipVideo?: boolean
|
603
|
+
/**
|
604
|
+
* 视频最长剪辑时间,单位秒。默认60s
|
605
|
+
* 时间范围为 60s 至 600 之间。 选择视频的时长小于15s不裁剪
|
606
|
+
*/
|
607
|
+
maxClipDuration?: number
|
608
|
+
/**
|
609
|
+
* 该参数只对iOS有效
|
610
|
+
* 选择导出的文件名称,和相册中文件的名称一致
|
611
|
+
* 默认为false, 使用每次文件名称唯一
|
612
|
+
*/
|
613
|
+
isGetAlbumFileName?: boolean
|
344
614
|
complete?: () => void
|
345
615
|
success?: (params: {
|
346
616
|
/**
|
@@ -502,7 +772,10 @@ declare namespace ty {
|
|
502
772
|
/** 视频文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) */
|
503
773
|
filePath: string
|
504
774
|
complete?: () => void
|
505
|
-
success?: (params:
|
775
|
+
success?: (params: {
|
776
|
+
/** 相册视频标识符 */
|
777
|
+
localIdentifier: string
|
778
|
+
}) => void
|
506
779
|
fail?: (params: {
|
507
780
|
errorMsg: string
|
508
781
|
errorCode: string | number
|
@@ -531,6 +804,58 @@ declare namespace ty {
|
|
531
804
|
}) => void
|
532
805
|
}): void
|
533
806
|
|
807
|
+
/**
|
808
|
+
* 裁剪图片选择
|
809
|
+
*/
|
810
|
+
export function cropImage(params: {
|
811
|
+
/** 图片路径 */
|
812
|
+
path: string
|
813
|
+
/** 裁剪的宽度 */
|
814
|
+
width: number
|
815
|
+
/** 裁剪的高度 */
|
816
|
+
height: number
|
817
|
+
/** 裁剪后的图片类型, 0:jpg 1:png */
|
818
|
+
type: number
|
819
|
+
complete?: () => void
|
820
|
+
success?: (params: {
|
821
|
+
/** 裁剪后图片路径 */
|
822
|
+
cropPath: string
|
823
|
+
}) => void
|
824
|
+
fail?: (params: {
|
825
|
+
errorMsg: string
|
826
|
+
errorCode: string | number
|
827
|
+
innerError: {
|
828
|
+
errorCode: string | number
|
829
|
+
errorMsg: string
|
830
|
+
}
|
831
|
+
}) => void
|
832
|
+
}): void
|
833
|
+
|
834
|
+
/**
|
835
|
+
* 获取图片的缩略图
|
836
|
+
*/
|
837
|
+
export function fetchImageThumbnail(params: {
|
838
|
+
/** 资源原始地址 */
|
839
|
+
originPath: string
|
840
|
+
/** 缩略图宽度 px */
|
841
|
+
thumbWidth: number
|
842
|
+
/** 缩略图高度 px */
|
843
|
+
thumbHeight: number
|
844
|
+
complete?: () => void
|
845
|
+
success?: (params: {
|
846
|
+
/** 缩略图地址 */
|
847
|
+
thumbnailPath: string
|
848
|
+
}) => void
|
849
|
+
fail?: (params: {
|
850
|
+
errorMsg: string
|
851
|
+
errorCode: string | number
|
852
|
+
innerError: {
|
853
|
+
errorCode: string | number
|
854
|
+
errorMsg: string
|
855
|
+
}
|
856
|
+
}) => void
|
857
|
+
}): void
|
858
|
+
|
534
859
|
/**
|
535
860
|
* 显示消息提示框
|
536
861
|
*/
|
@@ -575,6 +900,8 @@ declare namespace ty {
|
|
575
900
|
confirmText?: string
|
576
901
|
/** 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 */
|
577
902
|
confirmColor?: string
|
903
|
+
/** 是否全局弹窗,若为全局弹窗,弹在最顶上 */
|
904
|
+
isShowGlobal?: boolean
|
578
905
|
complete?: () => void
|
579
906
|
success?: (params: {
|
580
907
|
/** 为 true 时,表示用户点击了确定按钮 */
|
@@ -1094,6 +1421,43 @@ declare namespace ty {
|
|
1094
1421
|
}) => void
|
1095
1422
|
}): void
|
1096
1423
|
|
1424
|
+
/**
|
1425
|
+
* 获取当前APP授权设置
|
1426
|
+
*/
|
1427
|
+
export function getAppAuthorizeSetting(params?: {
|
1428
|
+
complete?: () => void
|
1429
|
+
success?: (params: {
|
1430
|
+
/** 允许使用相册的开关(仅 iOS 有效)authorized'/'denied'/'not determined */
|
1431
|
+
albumAuthorized: string
|
1432
|
+
/** 允许使用蓝牙的开关(仅 iOS 有效) authorized'/'denied'/'not determined */
|
1433
|
+
bluetoothAuthorized: string
|
1434
|
+
/** 允许使用摄像头的开关 authorized'/'denied'/'not determined */
|
1435
|
+
cameraAuthorized: string
|
1436
|
+
/** 允许使用定位的开关 authorized'/'denied'/'not determined */
|
1437
|
+
locationAuthorized: string
|
1438
|
+
/** 定位准确度。true 表示模糊定位,false 表示精确定位(仅 iOS 有效) */
|
1439
|
+
locationReducedAccuracy: boolean
|
1440
|
+
/** 允许使用麦克风的开关 'authorized'/'denied'/'not determined' */
|
1441
|
+
microphoneAuthorized: string
|
1442
|
+
/** 允许通知的开关 'authorized'/'denied'/'not determined' */
|
1443
|
+
notificationAuthorized: string
|
1444
|
+
/** 允许通知带有提醒的开关(仅 iOS 有效) 'authorized'/'denied'/'not determined' */
|
1445
|
+
notificationAlertAuthorized: string
|
1446
|
+
/** 允许通知带有标记的开关(仅 iOS 有效) 'authorized'/'denied'/'not determined' */
|
1447
|
+
notificationBadgeAuthorized: string
|
1448
|
+
/** 允许通知带有声音的开关(仅 iOS 有效) 'authorized'/'denied'/'not determined' */
|
1449
|
+
notificationSoundAuthorized: string
|
1450
|
+
}) => void
|
1451
|
+
fail?: (params: {
|
1452
|
+
errorMsg: string
|
1453
|
+
errorCode: string | number
|
1454
|
+
innerError: {
|
1455
|
+
errorCode: string | number
|
1456
|
+
errorMsg: string
|
1457
|
+
}
|
1458
|
+
}) => void
|
1459
|
+
}): void
|
1460
|
+
|
1097
1461
|
/**
|
1098
1462
|
* 获取网络类型
|
1099
1463
|
*/
|
@@ -1214,6 +1578,10 @@ declare namespace ty {
|
|
1214
1578
|
isShowActionTitle?: boolean
|
1215
1579
|
/** 是否显示闪关灯(仅Android生效) */
|
1216
1580
|
isShowTorch?: boolean
|
1581
|
+
/** 是否显示输入设置代码 */
|
1582
|
+
isShowKeyboard?: boolean
|
1583
|
+
/** 输入设置文案修改 */
|
1584
|
+
keyboardBean?: KeyboardBean
|
1217
1585
|
/** 自定义提示标语(仅Android生效) */
|
1218
1586
|
customTips?: string
|
1219
1587
|
/** 扫码类型 */
|
@@ -1339,15 +1707,75 @@ declare namespace ty {
|
|
1339
1707
|
*/
|
1340
1708
|
export function clearStorageSync(): null
|
1341
1709
|
|
1710
|
+
/**
|
1711
|
+
* 开始文件上传
|
1712
|
+
*/
|
1713
|
+
export function onUploadFileToDeviceStart(
|
1714
|
+
listener: (params: UploadStartEvent) => void
|
1715
|
+
): void
|
1716
|
+
|
1717
|
+
/**
|
1718
|
+
* 取消监听:开始文件上传
|
1719
|
+
*/
|
1720
|
+
export function offUploadFileToDeviceStart(
|
1721
|
+
listener: (params: UploadStartEvent) => void
|
1722
|
+
): void
|
1723
|
+
|
1724
|
+
/**
|
1725
|
+
* 上传文件进度回调
|
1726
|
+
*/
|
1727
|
+
export function onUploadFileToDeviceProgress(
|
1728
|
+
listener: (params: UploadProgressEvent) => void
|
1729
|
+
): void
|
1730
|
+
|
1731
|
+
/**
|
1732
|
+
* 取消监听:上传文件进度回调
|
1733
|
+
*/
|
1734
|
+
export function offUploadFileToDeviceProgress(
|
1735
|
+
listener: (params: UploadProgressEvent) => void
|
1736
|
+
): void
|
1737
|
+
|
1738
|
+
/**
|
1739
|
+
* 批量文件上传完成回调
|
1740
|
+
*/
|
1741
|
+
export function onUploadFileToDeviceComplete(
|
1742
|
+
listener: (params: UploadCompleteEvent) => void
|
1743
|
+
): void
|
1744
|
+
|
1745
|
+
/**
|
1746
|
+
* 取消监听:批量文件上传完成回调
|
1747
|
+
*/
|
1748
|
+
export function offUploadFileToDeviceComplete(
|
1749
|
+
listener: (params: UploadCompleteEvent) => void
|
1750
|
+
): void
|
1751
|
+
|
1752
|
+
/**
|
1753
|
+
* 分片上传进度回调
|
1754
|
+
*/
|
1755
|
+
export function onUploadFileFragToDeviceProgress(
|
1756
|
+
listener: (params: UploadFragProgressEvent) => void
|
1757
|
+
): void
|
1758
|
+
|
1759
|
+
/**
|
1760
|
+
* 取消监听:分片上传进度回调
|
1761
|
+
*/
|
1762
|
+
export function offUploadFileFragToDeviceProgress(
|
1763
|
+
listener: (params: UploadFragProgressEvent) => void
|
1764
|
+
): void
|
1765
|
+
|
1342
1766
|
/**
|
1343
1767
|
* onKeyboardHeightChange 发送键盘事件给js
|
1344
1768
|
*/
|
1345
|
-
export function onKeyboardHeightChange(
|
1769
|
+
export function onKeyboardHeightChange(
|
1770
|
+
listener: (params: BeanRes) => void
|
1771
|
+
): void
|
1346
1772
|
|
1347
1773
|
/**
|
1348
1774
|
* 取消监听:onKeyboardHeightChange 发送键盘事件给js
|
1349
1775
|
*/
|
1350
|
-
export function offKeyboardHeightChange(
|
1776
|
+
export function offKeyboardHeightChange(
|
1777
|
+
listener: (params: BeanRes) => void
|
1778
|
+
): void
|
1351
1779
|
|
1352
1780
|
/**
|
1353
1781
|
* 键盘弹出
|
@@ -1374,7 +1802,9 @@ declare namespace ty {
|
|
1374
1802
|
*
|
1375
1803
|
*关联API:[registerSystemVolumeChange, unRegisterSystemVolumeChange]
|
1376
1804
|
*/
|
1377
|
-
export function onSystemVolumeChangeEvent(
|
1805
|
+
export function onSystemVolumeChangeEvent(
|
1806
|
+
listener: (params: CurrentVolumeResponse) => void
|
1807
|
+
): void
|
1378
1808
|
|
1379
1809
|
/**
|
1380
1810
|
* 取消监听:系统音量监听通知事件
|
@@ -1388,22 +1818,30 @@ declare namespace ty {
|
|
1388
1818
|
/**
|
1389
1819
|
* 监听获取到 Wi-Fi 列表数据事件
|
1390
1820
|
*/
|
1391
|
-
export function onGetWifiList(
|
1821
|
+
export function onGetWifiList(
|
1822
|
+
listener: (params: WifiListResponse) => void
|
1823
|
+
): void
|
1392
1824
|
|
1393
1825
|
/**
|
1394
1826
|
* 取消监听:监听获取到 Wi-Fi 列表数据事件
|
1395
1827
|
*/
|
1396
|
-
export function offGetWifiList(
|
1828
|
+
export function offGetWifiList(
|
1829
|
+
listener: (params: WifiListResponse) => void
|
1830
|
+
): void
|
1397
1831
|
|
1398
1832
|
/**
|
1399
1833
|
* 持续录音事件
|
1400
1834
|
*/
|
1401
|
-
export function onRecordingEvent(
|
1835
|
+
export function onRecordingEvent(
|
1836
|
+
listener: (params: AudioRecordBufferBean) => void
|
1837
|
+
): void
|
1402
1838
|
|
1403
1839
|
/**
|
1404
1840
|
* 取消监听:持续录音事件
|
1405
1841
|
*/
|
1406
|
-
export function offRecordingEvent(
|
1842
|
+
export function offRecordingEvent(
|
1843
|
+
listener: (params: AudioRecordBufferBean) => void
|
1844
|
+
): void
|
1407
1845
|
|
1408
1846
|
/**
|
1409
1847
|
* 监听加速度数据事件
|
@@ -1596,21 +2034,21 @@ declare namespace ty {
|
|
1596
2034
|
|
1597
2035
|
export enum WidgetVersionType {
|
1598
2036
|
/** 线上版本 */
|
1599
|
-
release =
|
2037
|
+
release = "release",
|
1600
2038
|
|
1601
2039
|
/** 预发版本 */
|
1602
|
-
preview =
|
2040
|
+
preview = "preview",
|
1603
2041
|
}
|
1604
2042
|
|
1605
2043
|
export enum WidgetPosition {
|
1606
2044
|
/** 居底展示 */
|
1607
|
-
bottom =
|
2045
|
+
bottom = "bottom",
|
1608
2046
|
|
1609
2047
|
/** 居顶展示 */
|
1610
|
-
top =
|
2048
|
+
top = "top",
|
1611
2049
|
|
1612
2050
|
/** 居中展示 */
|
1613
|
-
center =
|
2051
|
+
center = "center",
|
1614
2052
|
}
|
1615
2053
|
|
1616
2054
|
export type Profile = {
|
@@ -1753,61 +2191,76 @@ declare namespace ty {
|
|
1753
2191
|
|
1754
2192
|
export enum HTTPMethod {
|
1755
2193
|
/** HTTP 请求 OPTIONS */
|
1756
|
-
OPTIONS =
|
2194
|
+
OPTIONS = "OPTIONS",
|
1757
2195
|
|
1758
2196
|
/** HTTP 请求 GET */
|
1759
|
-
GET =
|
2197
|
+
GET = "GET",
|
1760
2198
|
|
1761
2199
|
/** HTTP 请求 HEAD */
|
1762
|
-
HEAD =
|
2200
|
+
HEAD = "HEAD",
|
1763
2201
|
|
1764
2202
|
/** HTTP 请求 POST */
|
1765
|
-
POST =
|
2203
|
+
POST = "POST",
|
1766
2204
|
|
1767
2205
|
/** HTTP 请求 PUT */
|
1768
|
-
PUT =
|
2206
|
+
PUT = "PUT",
|
1769
2207
|
|
1770
2208
|
/** HTTP 请求 DELETE */
|
1771
|
-
DELETE =
|
2209
|
+
DELETE = "DELETE",
|
1772
2210
|
|
1773
2211
|
/** HTTP 请求 TRACE */
|
1774
|
-
TRACE =
|
2212
|
+
TRACE = "TRACE",
|
1775
2213
|
|
1776
2214
|
/** HTTP 请求 TRACE */
|
1777
|
-
CONNECT =
|
2215
|
+
CONNECT = "CONNECT",
|
1778
2216
|
}
|
1779
2217
|
|
1780
2218
|
export enum AccelerometerInterval {
|
1781
2219
|
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
1782
|
-
game =
|
2220
|
+
game = "game",
|
1783
2221
|
|
1784
2222
|
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
1785
|
-
ui =
|
2223
|
+
ui = "ui",
|
1786
2224
|
|
1787
2225
|
/** 普通的回调频率,在 200ms/次 左右 */
|
1788
|
-
normal =
|
2226
|
+
normal = "normal",
|
1789
2227
|
}
|
1790
2228
|
|
1791
2229
|
export enum DeviceMotionInterval {
|
1792
2230
|
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
1793
|
-
game =
|
2231
|
+
game = "game",
|
1794
2232
|
|
1795
2233
|
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
1796
|
-
ui =
|
2234
|
+
ui = "ui",
|
1797
2235
|
|
1798
2236
|
/** 普通的回调频率,在 200ms/次 左右 */
|
1799
|
-
normal =
|
2237
|
+
normal = "normal",
|
1800
2238
|
}
|
1801
2239
|
|
1802
2240
|
export enum GyroscopeInterval {
|
1803
2241
|
/** 适用于更新游戏的回调频率,在 20ms/次 左右 */
|
1804
|
-
game =
|
2242
|
+
game = "game",
|
1805
2243
|
|
1806
2244
|
/** 适用于更新 UI 的回调频率,在 60ms/次 左右 */
|
1807
|
-
ui =
|
2245
|
+
ui = "ui",
|
1808
2246
|
|
1809
2247
|
/** 普通的回调频率,在 200ms/次 左右 */
|
1810
|
-
normal =
|
2248
|
+
normal = "normal",
|
2249
|
+
}
|
2250
|
+
|
2251
|
+
export type Object = {}
|
2252
|
+
|
2253
|
+
export type CropImageItemBean = {
|
2254
|
+
/** 裁剪图片的地址 */
|
2255
|
+
filePath?: string
|
2256
|
+
/** 左上角坐标X */
|
2257
|
+
topLeftX: number
|
2258
|
+
/** 左上角坐标Y */
|
2259
|
+
topLeftY: number
|
2260
|
+
/** 右下角坐标X */
|
2261
|
+
bottomRightX: number
|
2262
|
+
/** 右下角坐标Y */
|
2263
|
+
bottomRightY: number
|
1811
2264
|
}
|
1812
2265
|
|
1813
2266
|
export type TempFileCB = {
|
@@ -1836,6 +2289,8 @@ declare namespace ty {
|
|
1836
2289
|
* 'video' 视频
|
1837
2290
|
*/
|
1838
2291
|
fileType: string
|
2292
|
+
/** 相册原始视频地址 */
|
2293
|
+
originalVideoPath: string
|
1839
2294
|
}
|
1840
2295
|
|
1841
2296
|
export type SafeArea = {
|
@@ -1848,15 +2303,26 @@ declare namespace ty {
|
|
1848
2303
|
}
|
1849
2304
|
|
1850
2305
|
export enum Themes {
|
1851
|
-
dark =
|
2306
|
+
dark = "dark",
|
1852
2307
|
|
1853
|
-
light =
|
2308
|
+
light = "light",
|
1854
2309
|
}
|
1855
2310
|
|
1856
2311
|
export enum Orientation {
|
1857
|
-
portrait =
|
2312
|
+
portrait = "portrait",
|
2313
|
+
|
2314
|
+
landscape = "landscape",
|
2315
|
+
}
|
1858
2316
|
|
1859
|
-
|
2317
|
+
export type KeyboardBean = {
|
2318
|
+
/** 键盘标题&&输入页标题 */
|
2319
|
+
title?: string
|
2320
|
+
/** 输入页输入框提示语 */
|
2321
|
+
placeholder?: string
|
2322
|
+
/** 输入页输入描述 */
|
2323
|
+
desc?: string
|
2324
|
+
/** 输入页操作按钮文案 */
|
2325
|
+
actionText?: string
|
1860
2326
|
}
|
1861
2327
|
|
1862
2328
|
export type StorageDataBean = {
|
@@ -1871,6 +2337,91 @@ declare namespace ty {
|
|
1871
2337
|
key: string
|
1872
2338
|
}
|
1873
2339
|
|
2340
|
+
export type UploadStartEvent = {
|
2341
|
+
/** 任务id */
|
2342
|
+
taskId: string
|
2343
|
+
/** sid */
|
2344
|
+
sid: string
|
2345
|
+
/** 文件前缀 */
|
2346
|
+
prefix: string
|
2347
|
+
/** 文件个数 */
|
2348
|
+
fileCount: number
|
2349
|
+
/** 扩展字段 */
|
2350
|
+
extData?: Object
|
2351
|
+
}
|
2352
|
+
|
2353
|
+
export type UploadProgressEvent = {
|
2354
|
+
/** 任务id */
|
2355
|
+
taskId: string
|
2356
|
+
/** sid */
|
2357
|
+
sid: string
|
2358
|
+
/** 文件前缀 */
|
2359
|
+
prefix: string
|
2360
|
+
/**
|
2361
|
+
* 上传的文件名称,非本地文件名
|
2362
|
+
* 0001-1
|
2363
|
+
* 0001-2
|
2364
|
+
*/
|
2365
|
+
name: string
|
2366
|
+
/** 文件路径 */
|
2367
|
+
filePath: string
|
2368
|
+
/** 文件上传Url, 如果有分片,该属性为空 */
|
2369
|
+
cloudUrl?: string
|
2370
|
+
/** 错误码,0 成功,非0失败 */
|
2371
|
+
code: string
|
2372
|
+
/** 错误信息 */
|
2373
|
+
error?: string
|
2374
|
+
/** 分片信息, 如果没分片,该属性为空 */
|
2375
|
+
frags?: FragInfoBean[]
|
2376
|
+
/** 扩展字段 */
|
2377
|
+
extData?: Object
|
2378
|
+
}
|
2379
|
+
|
2380
|
+
export type UploadCompleteEvent = {
|
2381
|
+
/** 任务id */
|
2382
|
+
taskId: string
|
2383
|
+
/** sid */
|
2384
|
+
sid: string
|
2385
|
+
/** 文件前缀 */
|
2386
|
+
prefix: string
|
2387
|
+
/** 上传成功的文件 */
|
2388
|
+
uploaded?: string[]
|
2389
|
+
/** 上传失败的文件 */
|
2390
|
+
failed?: string[]
|
2391
|
+
/** 扩展字段 */
|
2392
|
+
extData?: Object
|
2393
|
+
}
|
2394
|
+
|
2395
|
+
export type UploadFragProgressEvent = {
|
2396
|
+
/** 任务id */
|
2397
|
+
taskId: string
|
2398
|
+
/** sid */
|
2399
|
+
sid: string
|
2400
|
+
/** 文件前缀 */
|
2401
|
+
prefix: string
|
2402
|
+
/** 完整文件的路径 */
|
2403
|
+
filePath: string
|
2404
|
+
/**
|
2405
|
+
* 分片名称,
|
2406
|
+
* 上传的分片名称,非本地分片
|
2407
|
+
* 0001-4-frag-1
|
2408
|
+
* 0001-4-frag-2
|
2409
|
+
* 0001-4-frag-3
|
2410
|
+
* 0001-4-frag-4
|
2411
|
+
*/
|
2412
|
+
fragName: string
|
2413
|
+
/** 分片路径 */
|
2414
|
+
fragPath: string
|
2415
|
+
/** 分片Url */
|
2416
|
+
fragCloudUrl?: string
|
2417
|
+
/** 错误码,0 成功,非0失败 */
|
2418
|
+
code: string
|
2419
|
+
/** 错误信息 */
|
2420
|
+
error?: string
|
2421
|
+
/** 扩展字段 */
|
2422
|
+
extData?: Object
|
2423
|
+
}
|
2424
|
+
|
1874
2425
|
export type BeanRes = {
|
1875
2426
|
/** 键盘高度 */
|
1876
2427
|
height: number
|
@@ -1958,16 +2509,32 @@ declare namespace ty {
|
|
1958
2509
|
scope: string
|
1959
2510
|
}
|
1960
2511
|
|
2512
|
+
export type SettingBean = {
|
2513
|
+
authSetting: Record<string, boolean>
|
2514
|
+
}
|
2515
|
+
|
1961
2516
|
export type ToMiniProgramBean = {
|
1962
2517
|
/** 要打开的小程序appId */
|
1963
2518
|
appId?: string
|
2519
|
+
/** 要打开的智能体小程序的智能体Id */
|
2520
|
+
aiPtChannel?: string
|
2521
|
+
/**
|
2522
|
+
* 要打开的小程序智能体的版本。
|
2523
|
+
* preview:体验版
|
2524
|
+
* release:正式版
|
2525
|
+
*/
|
2526
|
+
aiPtType?: string
|
1964
2527
|
/** 打开的页面路径,如果为空则打开首页,path 中 ? 后面的部分会成为 query,在小程序的 `App.onLaunch`、`App.onShow` 和 `Page.onLoad` 的回调函数 */
|
1965
2528
|
path?: string
|
1966
2529
|
/** 打开小程序的转场方式,分为right|bottom,指代水平和竖直方向 */
|
1967
2530
|
position?: string
|
1968
2531
|
/** 传递给目标小程序的数据,目标小程序可在 `App.onLaunch`,`App.onShow` 中获取到这份数据 */
|
1969
2532
|
extraData?: Record<string, any>
|
1970
|
-
/**
|
2533
|
+
/**
|
2534
|
+
* 要打开的小程序版本。仅在当前小程序为开发版或体验版时此参数有效。如果当前小程序是正式版,则打开的小程序必定是正式版
|
2535
|
+
* trial:体验版
|
2536
|
+
* release:正式版
|
2537
|
+
*/
|
1971
2538
|
envVersion?: string
|
1972
2539
|
/** 小程序链接,当传递该参数后,可以不传 appId 和 path */
|
1973
2540
|
shortLink?: string
|
@@ -2008,6 +2575,53 @@ declare namespace ty {
|
|
2008
2575
|
dialogId: string
|
2009
2576
|
}
|
2010
2577
|
|
2578
|
+
export type VideoThumbnailsBean = {
|
2579
|
+
/** 视频文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) */
|
2580
|
+
filePath: string
|
2581
|
+
/** 开始时间,毫秒 */
|
2582
|
+
startTime: number
|
2583
|
+
/** 结束时间,毫秒 */
|
2584
|
+
endTime: number
|
2585
|
+
/** 缩略图个数 */
|
2586
|
+
thumbnailCount: number
|
2587
|
+
/** 缩略图宽高,期望值 */
|
2588
|
+
thumbnailWidth: number
|
2589
|
+
/** 缩略图高,期望值 */
|
2590
|
+
thumbnailHeight: number
|
2591
|
+
}
|
2592
|
+
|
2593
|
+
export type VideoThumbnailsResult = {
|
2594
|
+
/** 缩略图路径 */
|
2595
|
+
thumbnailsPath?: string[]
|
2596
|
+
}
|
2597
|
+
|
2598
|
+
export type ClearVideoThumbnailsBean = {
|
2599
|
+
/** 对应视频文件名称 */
|
2600
|
+
videoName: string
|
2601
|
+
}
|
2602
|
+
|
2603
|
+
export type VideoClipBean = {
|
2604
|
+
/** 视频文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) */
|
2605
|
+
filePath: string
|
2606
|
+
/** 开始时间,毫秒 */
|
2607
|
+
startTime: number
|
2608
|
+
/** 结束时间,毫秒 */
|
2609
|
+
endTime: number
|
2610
|
+
/**
|
2611
|
+
* 目标压缩的分辨率
|
2612
|
+
* 1 - 480*854 码率:1572*1000
|
2613
|
+
* 2 - 540*960 码率:2128*1000
|
2614
|
+
* 3 - 720*1280 码率:3145*1000
|
2615
|
+
* 4 - 1080*1920 码率:3500*1000
|
2616
|
+
*/
|
2617
|
+
level: number
|
2618
|
+
}
|
2619
|
+
|
2620
|
+
export type VideoClipResult = {
|
2621
|
+
/** 裁剪视频路径 */
|
2622
|
+
videoClipPath?: string
|
2623
|
+
}
|
2624
|
+
|
2011
2625
|
export type DeviceMotionBean = {
|
2012
2626
|
/** 监听加速度数据回调函数的执行频率 */
|
2013
2627
|
interval?: DeviceMotionInterval
|
@@ -2083,11 +2697,95 @@ declare namespace ty {
|
|
2083
2697
|
append?: boolean
|
2084
2698
|
}
|
2085
2699
|
|
2700
|
+
export type FileInfoParams = {
|
2701
|
+
/** 要读取的文件路径 */
|
2702
|
+
filePath: string
|
2703
|
+
/** 计算文件摘要的算法, md5/sha1/sha256 默认MD5 */
|
2704
|
+
digestAlgorithm: string
|
2705
|
+
}
|
2706
|
+
|
2707
|
+
export type FileInfoRes = {
|
2708
|
+
/** 文件大小,字节 */
|
2709
|
+
size: number
|
2710
|
+
/** 按照传入的 digestAlgorithm 计算得出的的文件摘要 */
|
2711
|
+
digest: string
|
2712
|
+
}
|
2713
|
+
|
2086
2714
|
export type GyroscopeBean = {
|
2087
2715
|
/** 监听陀螺仪数据回调函数的执行频率 */
|
2088
2716
|
interval?: GyroscopeInterval
|
2089
2717
|
}
|
2090
2718
|
|
2719
|
+
export type FragInfoBean = {
|
2720
|
+
/**
|
2721
|
+
* 分片名称,
|
2722
|
+
* 上传的分片名称,非本地分片
|
2723
|
+
* 0001-4-frag-1
|
2724
|
+
* 0001-4-frag-2
|
2725
|
+
* 0001-4-frag-3
|
2726
|
+
* 0001-4-frag-4
|
2727
|
+
*/
|
2728
|
+
fragName: string
|
2729
|
+
/** 文件上传Url */
|
2730
|
+
fragCloudUrl?: string
|
2731
|
+
/** 分片本地路径 */
|
2732
|
+
fragPath: string
|
2733
|
+
/** 错误码,0 成功,非0失败 */
|
2734
|
+
code: string
|
2735
|
+
/** 错误信息 */
|
2736
|
+
error?: string
|
2737
|
+
}
|
2738
|
+
|
2739
|
+
export type InitBean = {
|
2740
|
+
/** 设备id */
|
2741
|
+
deviceId: string
|
2742
|
+
}
|
2743
|
+
|
2744
|
+
export type UploadFileBean = {
|
2745
|
+
/** 设备id */
|
2746
|
+
deviceId: string
|
2747
|
+
/** sid */
|
2748
|
+
sid: string
|
2749
|
+
/** 上传文件路径列表 */
|
2750
|
+
fileList?: string[]
|
2751
|
+
/** 扩展字段 */
|
2752
|
+
extData?: Object
|
2753
|
+
}
|
2754
|
+
|
2755
|
+
export type UploadFileCb = {
|
2756
|
+
/** 任务id */
|
2757
|
+
taskId: string
|
2758
|
+
}
|
2759
|
+
|
2760
|
+
export type CancelUploadBean = {
|
2761
|
+
/** 任务id */
|
2762
|
+
taskId: string
|
2763
|
+
}
|
2764
|
+
|
2765
|
+
export type CompressImageBean = {
|
2766
|
+
/** 压缩图片路径列表 */
|
2767
|
+
fileList?: string[]
|
2768
|
+
/** 压缩图片的目标宽 */
|
2769
|
+
dstWidth: number
|
2770
|
+
/** 压缩图片的目标高 */
|
2771
|
+
dstHeight: number
|
2772
|
+
}
|
2773
|
+
|
2774
|
+
export type CompressImageCb = {
|
2775
|
+
/** 压缩完成的图片路径列表 */
|
2776
|
+
fileList?: string[]
|
2777
|
+
}
|
2778
|
+
|
2779
|
+
export type CropImageBean = {
|
2780
|
+
/** 裁剪图片的地址 */
|
2781
|
+
cropFileList?: CropImageItemBean[]
|
2782
|
+
}
|
2783
|
+
|
2784
|
+
export type CropImageCb = {
|
2785
|
+
/** 裁剪完成的图片路径列表 */
|
2786
|
+
fileList?: string[]
|
2787
|
+
}
|
2788
|
+
|
2091
2789
|
export type ChooseImageBean = {
|
2092
2790
|
/** 最多可以选择的图片张数 */
|
2093
2791
|
count?: number
|
@@ -2095,6 +2793,8 @@ declare namespace ty {
|
|
2095
2793
|
sizeType?: string[]
|
2096
2794
|
/** 选择图片的来源 ['album', 'camera'] */
|
2097
2795
|
sourceType?: string[]
|
2796
|
+
/** 是否取消选择图片后关闭界面的动画效果 */
|
2797
|
+
disableDismissAnimationAfterSelect?: boolean
|
2098
2798
|
}
|
2099
2799
|
|
2100
2800
|
export type ChooseImageCB = {
|
@@ -2124,6 +2824,30 @@ declare namespace ty {
|
|
2124
2824
|
* 时间范围为 3s 至 60s 之间。不限制相册。
|
2125
2825
|
*/
|
2126
2826
|
maxDuration?: number
|
2827
|
+
/**
|
2828
|
+
* 该参数只对iOS有效
|
2829
|
+
* 是否拷贝视频:
|
2830
|
+
* 默认true,拷贝视频,返回视频拷贝地址,返回视频封面地址
|
2831
|
+
* false,不拷贝视频,返回视频相册中的地址,返回视频封面图地址
|
2832
|
+
*/
|
2833
|
+
isFetchVideoFile?: boolean
|
2834
|
+
/**
|
2835
|
+
* 该参数只对iOS有效
|
2836
|
+
* 相册选择的视频是否需要裁剪
|
2837
|
+
* 默认为false, 不裁剪视频
|
2838
|
+
*/
|
2839
|
+
isClipVideo?: boolean
|
2840
|
+
/**
|
2841
|
+
* 视频最长剪辑时间,单位秒。默认60s
|
2842
|
+
* 时间范围为 60s 至 600 之间。 选择视频的时长小于15s不裁剪
|
2843
|
+
*/
|
2844
|
+
maxClipDuration?: number
|
2845
|
+
/**
|
2846
|
+
* 该参数只对iOS有效
|
2847
|
+
* 选择导出的文件名称,和相册中文件的名称一致
|
2848
|
+
* 默认为false, 使用每次文件名称唯一
|
2849
|
+
*/
|
2850
|
+
isGetAlbumFileName?: boolean
|
2127
2851
|
}
|
2128
2852
|
|
2129
2853
|
export type ChooseMediaCB = {
|
@@ -2229,11 +2953,46 @@ declare namespace ty {
|
|
2229
2953
|
filePath: string
|
2230
2954
|
}
|
2231
2955
|
|
2956
|
+
export type VideoSaveAlbumResponse = {
|
2957
|
+
/** 相册视频标识符 */
|
2958
|
+
localIdentifier: string
|
2959
|
+
}
|
2960
|
+
|
2232
2961
|
export type SaveImageParams = {
|
2233
2962
|
/** 图片文件路径,可以是临时文件路径也可以是永久文件路径 (本地路径) */
|
2234
2963
|
filePath: string
|
2235
2964
|
}
|
2236
2965
|
|
2966
|
+
export type CropImageBean_8zIFMW = {
|
2967
|
+
/** 图片路径 */
|
2968
|
+
path: string
|
2969
|
+
/** 裁剪的宽度 */
|
2970
|
+
width: number
|
2971
|
+
/** 裁剪的高度 */
|
2972
|
+
height: number
|
2973
|
+
/** 裁剪后的图片类型, 0:jpg 1:png */
|
2974
|
+
type: number
|
2975
|
+
}
|
2976
|
+
|
2977
|
+
export type CropImageResult = {
|
2978
|
+
/** 裁剪后图片路径 */
|
2979
|
+
cropPath: string
|
2980
|
+
}
|
2981
|
+
|
2982
|
+
export type ImageThumbnailBean = {
|
2983
|
+
/** 资源原始地址 */
|
2984
|
+
originPath: string
|
2985
|
+
/** 缩略图宽度 px */
|
2986
|
+
thumbWidth: number
|
2987
|
+
/** 缩略图高度 px */
|
2988
|
+
thumbHeight: number
|
2989
|
+
}
|
2990
|
+
|
2991
|
+
export type ImageThumbnailResult = {
|
2992
|
+
/** 缩略图地址 */
|
2993
|
+
thumbnailPath: string
|
2994
|
+
}
|
2995
|
+
|
2237
2996
|
export type ToastBean = {
|
2238
2997
|
/** 提示的内容 */
|
2239
2998
|
title: string
|
@@ -2262,6 +3021,8 @@ declare namespace ty {
|
|
2262
3021
|
confirmText?: string
|
2263
3022
|
/** 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 */
|
2264
3023
|
confirmColor?: string
|
3024
|
+
/** 是否全局弹窗,若为全局弹窗,弹在最顶上 */
|
3025
|
+
isShowGlobal?: boolean
|
2265
3026
|
}
|
2266
3027
|
|
2267
3028
|
export type ModalCallback = {
|
@@ -2484,6 +3245,29 @@ declare namespace ty {
|
|
2484
3245
|
partialInfo?: boolean
|
2485
3246
|
}
|
2486
3247
|
|
3248
|
+
export type AppAuthorizeSettingRes = {
|
3249
|
+
/** 允许使用相册的开关(仅 iOS 有效)authorized'/'denied'/'not determined */
|
3250
|
+
albumAuthorized: string
|
3251
|
+
/** 允许使用蓝牙的开关(仅 iOS 有效) authorized'/'denied'/'not determined */
|
3252
|
+
bluetoothAuthorized: string
|
3253
|
+
/** 允许使用摄像头的开关 authorized'/'denied'/'not determined */
|
3254
|
+
cameraAuthorized: string
|
3255
|
+
/** 允许使用定位的开关 authorized'/'denied'/'not determined */
|
3256
|
+
locationAuthorized: string
|
3257
|
+
/** 定位准确度。true 表示模糊定位,false 表示精确定位(仅 iOS 有效) */
|
3258
|
+
locationReducedAccuracy: boolean
|
3259
|
+
/** 允许使用麦克风的开关 'authorized'/'denied'/'not determined' */
|
3260
|
+
microphoneAuthorized: string
|
3261
|
+
/** 允许通知的开关 'authorized'/'denied'/'not determined' */
|
3262
|
+
notificationAuthorized: string
|
3263
|
+
/** 允许通知带有提醒的开关(仅 iOS 有效) 'authorized'/'denied'/'not determined' */
|
3264
|
+
notificationAlertAuthorized: string
|
3265
|
+
/** 允许通知带有标记的开关(仅 iOS 有效) 'authorized'/'denied'/'not determined' */
|
3266
|
+
notificationBadgeAuthorized: string
|
3267
|
+
/** 允许通知带有声音的开关(仅 iOS 有效) 'authorized'/'denied'/'not determined' */
|
3268
|
+
notificationSoundAuthorized: string
|
3269
|
+
}
|
3270
|
+
|
2487
3271
|
export type NetworkTypeCB = {
|
2488
3272
|
/** 网络类型 */
|
2489
3273
|
networkType: string
|
@@ -2540,6 +3324,12 @@ declare namespace ty {
|
|
2540
3324
|
contextId: string
|
2541
3325
|
/** 间隔时间 ms */
|
2542
3326
|
period: number
|
3327
|
+
/**
|
3328
|
+
* 由于历史原因,iOS默认32-bit PCM,Android默认16-bit PCM
|
3329
|
+
* true表示统一双端的默认值为16,false保持原有默认值
|
3330
|
+
* default true
|
3331
|
+
*/
|
3332
|
+
pcm16IOS?: boolean
|
2543
3333
|
}
|
2544
3334
|
|
2545
3335
|
export type ScanCodeBean = {
|
@@ -2549,6 +3339,10 @@ declare namespace ty {
|
|
2549
3339
|
isShowActionTitle?: boolean
|
2550
3340
|
/** 是否显示闪关灯(仅Android生效) */
|
2551
3341
|
isShowTorch?: boolean
|
3342
|
+
/** 是否显示输入设置代码 */
|
3343
|
+
isShowKeyboard?: boolean
|
3344
|
+
/** 输入设置文案修改 */
|
3345
|
+
keyboardBean?: KeyboardBean
|
2552
3346
|
/** 自定义提示标语(仅Android生效) */
|
2553
3347
|
customTips?: string
|
2554
3348
|
/** 扫码类型 */
|
@@ -3351,6 +4145,12 @@ declare namespace ty {
|
|
3351
4145
|
startRecording(params: {
|
3352
4146
|
/** 间隔时间 ms */
|
3353
4147
|
period: number
|
4148
|
+
/**
|
4149
|
+
* 由于历史原因,iOS默认32-bit PCM,Android默认16-bit PCM
|
4150
|
+
* true表示统一双端的默认值为16,false保持原有默认值
|
4151
|
+
* default true
|
4152
|
+
*/
|
4153
|
+
pcm16IOS?: boolean
|
3354
4154
|
complete?: () => void
|
3355
4155
|
success?: (params: null) => void
|
3356
4156
|
fail?: (params: {
|