@ray-js/api 1.7.83 → 1.7.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/AIStreamKit.d.ts +530 -10
- package/@types/BaseKit.d.ts +291 -233
- package/@types/BizKit.d.ts +499 -161
- package/@types/LightKit.d.ts +3 -3
- package/@types/MapKit.d.ts +24 -24
- package/@types/MiniKit.d.ts +117 -92
- package/@types/OutdoorKit.d.ts +61 -61
- package/@types/P2PKit.d.ts +25 -25
- package/@types/WearKit.d.ts +550 -26
- package/lib/nativeRouters/device.d.ts +50 -15
- package/lib/nativeRouters/device.js +47 -15
- package/lib/nativeRouters/gw.d.ts +0 -3
- package/lib/nativeRouters/gw.js +0 -3
- package/lib/nativeRouters/outdoors.d.ts +12 -3
- package/lib/nativeRouters/outdoors.js +11 -3
- package/lib/nativeRouters/root.d.ts +33 -5
- package/lib/nativeRouters/root.js +32 -5
- package/package.json +5 -5
package/@types/WearKit.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WearKit
|
|
3
3
|
*
|
|
4
|
-
* @version 3.2
|
|
4
|
+
* @version 3.3.2
|
|
5
5
|
*/
|
|
6
6
|
declare namespace ty.wear {
|
|
7
7
|
/**
|
|
@@ -3985,6 +3985,16 @@ declare namespace ty.wear {
|
|
|
3985
3985
|
* @since WearKit 1.9.1
|
|
3986
3986
|
*/
|
|
3987
3987
|
linkShared: number
|
|
3988
|
+
/**
|
|
3989
|
+
* 转写是否已编辑,0未编辑、1已编辑
|
|
3990
|
+
* @since WearKit 3.3.0
|
|
3991
|
+
*/
|
|
3992
|
+
transcriptEdited?: number
|
|
3993
|
+
/**
|
|
3994
|
+
* 总结是否已编辑,0未编辑、1已编辑
|
|
3995
|
+
* @since WearKit 3.3.0
|
|
3996
|
+
*/
|
|
3997
|
+
summaryEdited?: number
|
|
3988
3998
|
/**
|
|
3989
3999
|
* 离线文件上传进度,默认0,范围0-100
|
|
3990
4000
|
* @since WearKit 1.9.1
|
|
@@ -4005,6 +4015,11 @@ declare namespace ty.wear {
|
|
|
4005
4015
|
* @since WearKit 3.0.0
|
|
4006
4016
|
*/
|
|
4007
4017
|
summaryImageStatus?: number
|
|
4018
|
+
/**
|
|
4019
|
+
* 文件夹id
|
|
4020
|
+
* @since WearKit 7.10.0
|
|
4021
|
+
*/
|
|
4022
|
+
folderId?: string
|
|
4008
4023
|
}) => void
|
|
4009
4024
|
/** 接口调用失败的回调函数 */
|
|
4010
4025
|
fail?: (params: {
|
|
@@ -5699,6 +5714,227 @@ declare namespace ty.wear {
|
|
|
5699
5714
|
}) => void
|
|
5700
5715
|
}): void
|
|
5701
5716
|
|
|
5717
|
+
/**
|
|
5718
|
+
* 文件夹操作(新建 / 重命名 / 删除 / 移动),按 type 分发对应 ATOP 并同步本地库
|
|
5719
|
+
* @description.en Folder operation (add / rename / delete / move). Dispatches to the corresponding ATOP by type and syncs the local DB.
|
|
5720
|
+
* @public
|
|
5721
|
+
* @since WearKit 3.3.0
|
|
5722
|
+
* @example 基础用法
|
|
5723
|
+
* ```tsx
|
|
5724
|
+
* ty.wear.operateFolder({
|
|
5725
|
+
* type: 'add',
|
|
5726
|
+
* folderName: '培训资料',
|
|
5727
|
+
* success: (r) => {
|
|
5728
|
+
* console.log('operateFolder success', r.folderId, r.folderName);
|
|
5729
|
+
* },
|
|
5730
|
+
* fail: error => {
|
|
5731
|
+
* console.error(error);
|
|
5732
|
+
* },
|
|
5733
|
+
* });
|
|
5734
|
+
* ```
|
|
5735
|
+
* @see https://developer.tuya.com/
|
|
5736
|
+
* @platform iOS Android
|
|
5737
|
+
* @error {10001} 内部错误
|
|
5738
|
+
* @error {10012} 记录不存在
|
|
5739
|
+
*/
|
|
5740
|
+
export function operateFolder(params: {
|
|
5741
|
+
/**
|
|
5742
|
+
* 操作类型
|
|
5743
|
+
* 'add': 新建
|
|
5744
|
+
* 'rename': 重命名
|
|
5745
|
+
* 'delete': 删除
|
|
5746
|
+
* 'move': 移动
|
|
5747
|
+
* @since WearKit 3.3.0
|
|
5748
|
+
*/
|
|
5749
|
+
type: string
|
|
5750
|
+
/**
|
|
5751
|
+
* 文件夹名称(add / rename 必填)
|
|
5752
|
+
* @since WearKit 3.3.0
|
|
5753
|
+
*/
|
|
5754
|
+
folderName?: string
|
|
5755
|
+
/**
|
|
5756
|
+
* 文件夹业务 id(rename / delete 必填)
|
|
5757
|
+
* @since WearKit 3.3.0
|
|
5758
|
+
*/
|
|
5759
|
+
folderId?: string
|
|
5760
|
+
/**
|
|
5761
|
+
* 移动的录音 id 列表(move 必填,长度 1~100)
|
|
5762
|
+
* @since WearKit 3.3.0
|
|
5763
|
+
*/
|
|
5764
|
+
recordIds?: string[]
|
|
5765
|
+
/**
|
|
5766
|
+
* 目标文件夹 id(move;不传/空 = 移回未分类)
|
|
5767
|
+
* @since WearKit 3.3.0
|
|
5768
|
+
*/
|
|
5769
|
+
targetFolderId?: string
|
|
5770
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
5771
|
+
complete?: () => void
|
|
5772
|
+
/** 接口调用成功的回调函数 */
|
|
5773
|
+
success?: (params: {
|
|
5774
|
+
/**
|
|
5775
|
+
* 文件夹业务 id
|
|
5776
|
+
* @since WearKit 3.3.0
|
|
5777
|
+
*/
|
|
5778
|
+
folderId: string
|
|
5779
|
+
/**
|
|
5780
|
+
* 文件夹名称
|
|
5781
|
+
* @since WearKit 3.3.0
|
|
5782
|
+
*/
|
|
5783
|
+
folderName: string
|
|
5784
|
+
/**
|
|
5785
|
+
* delete / move 时为 true
|
|
5786
|
+
* @since WearKit 3.3.0
|
|
5787
|
+
*/
|
|
5788
|
+
result?: boolean
|
|
5789
|
+
}) => void
|
|
5790
|
+
/** 接口调用失败的回调函数 */
|
|
5791
|
+
fail?: (params: {
|
|
5792
|
+
/** 错误信息 */
|
|
5793
|
+
errorMsg: string
|
|
5794
|
+
/** 错误码 */
|
|
5795
|
+
errorCode: string | number
|
|
5796
|
+
/** 错误扩展 */
|
|
5797
|
+
innerError: {
|
|
5798
|
+
/** 错误扩展码 */
|
|
5799
|
+
errorCode: string | number
|
|
5800
|
+
/** 错误扩展信息 */
|
|
5801
|
+
errorMsg: string
|
|
5802
|
+
}
|
|
5803
|
+
}) => void
|
|
5804
|
+
}): void
|
|
5805
|
+
|
|
5806
|
+
/**
|
|
5807
|
+
* 分类总览(纯本地聚合,无 ATOP),返回状态三分组 / 文件夹分组(含未分类)/ 来源四类目计数
|
|
5808
|
+
* @description.en Category overview. Pure local aggregation (no ATOP). Returns status / folder (incl. unfiled) / source counts.
|
|
5809
|
+
* @public
|
|
5810
|
+
* @since WearKit 3.3.0
|
|
5811
|
+
* @example 基础用法
|
|
5812
|
+
* ```tsx
|
|
5813
|
+
* ty.wear.categoryOverview({
|
|
5814
|
+
* success: (r) => {
|
|
5815
|
+
* console.log('categoryOverview success', r.statusGroup, r.folders, r.sourceGroup);
|
|
5816
|
+
* },
|
|
5817
|
+
* fail: error => {
|
|
5818
|
+
* console.error(error);
|
|
5819
|
+
* },
|
|
5820
|
+
* });
|
|
5821
|
+
* ```
|
|
5822
|
+
* @see https://developer.tuya.com/
|
|
5823
|
+
* @platform iOS Android
|
|
5824
|
+
* @error {10001} 内部错误
|
|
5825
|
+
*/
|
|
5826
|
+
export function categoryOverview(params?: {
|
|
5827
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
5828
|
+
complete?: () => void
|
|
5829
|
+
/** 接口调用成功的回调函数 */
|
|
5830
|
+
success?: (params: {
|
|
5831
|
+
/**
|
|
5832
|
+
* 状态三分组(固定 3 项,建议顺序:ALL → PENDING_SUMMARY → SUMMARIZED)
|
|
5833
|
+
* @since WearKit 3.3.0
|
|
5834
|
+
*/
|
|
5835
|
+
statusGroup: CategoryOverviewStatusCountItem[]
|
|
5836
|
+
/**
|
|
5837
|
+
* 文件夹列表(含未分类,首项 folderId='UNFILED' 为未分类,其后为自建夹)
|
|
5838
|
+
* @since WearKit 3.3.0
|
|
5839
|
+
*/
|
|
5840
|
+
folders: CategoryOverviewFolderCountItem[]
|
|
5841
|
+
/**
|
|
5842
|
+
* 来源四类目(固定 4 项:PHONE / PC / HEADPHONE / RECORDER_CARD)
|
|
5843
|
+
* @since WearKit 3.3.0
|
|
5844
|
+
*/
|
|
5845
|
+
sourceGroup: CategoryOverviewSourceCountItem[]
|
|
5846
|
+
}) => void
|
|
5847
|
+
/** 接口调用失败的回调函数 */
|
|
5848
|
+
fail?: (params: {
|
|
5849
|
+
/** 错误信息 */
|
|
5850
|
+
errorMsg: string
|
|
5851
|
+
/** 错误码 */
|
|
5852
|
+
errorCode: string | number
|
|
5853
|
+
/** 错误扩展 */
|
|
5854
|
+
innerError: {
|
|
5855
|
+
/** 错误扩展码 */
|
|
5856
|
+
errorCode: string | number
|
|
5857
|
+
/** 错误扩展信息 */
|
|
5858
|
+
errorMsg: string
|
|
5859
|
+
}
|
|
5860
|
+
}) => void
|
|
5861
|
+
}): void
|
|
5862
|
+
|
|
5863
|
+
/**
|
|
5864
|
+
* 按范围查询文件列表(纯本地 files,无 ATOP),状态 / 文件夹 / 来源三选一,至多一组有值
|
|
5865
|
+
* @description.en Query files by category (pure local, no ATOP). Returns RecordTransferResult[]. One of statuses / folderIds / sourceCategories at most. Supports orderBy / asc / pageSize.
|
|
5866
|
+
* @public
|
|
5867
|
+
* @since WearKit 3.3.0
|
|
5868
|
+
* @example 基础用法
|
|
5869
|
+
* ```tsx
|
|
5870
|
+
* ty.wear.queryFilesByCategory({
|
|
5871
|
+
* folderIds: ['f_8f3a...'],
|
|
5872
|
+
* orderBy: 1, // 0: fileId, 1: recordTime, 2: updateAt
|
|
5873
|
+
* asc: 0, // 0: desc, 1: asc
|
|
5874
|
+
* pageSize: 20,
|
|
5875
|
+
* success: (list) => {
|
|
5876
|
+
* console.log('queryFilesByCategory success', list);
|
|
5877
|
+
* },
|
|
5878
|
+
* fail: error => {
|
|
5879
|
+
* console.error(error);
|
|
5880
|
+
* },
|
|
5881
|
+
* });
|
|
5882
|
+
* ```
|
|
5883
|
+
* @see https://developer.tuya.com/
|
|
5884
|
+
* @platform iOS Android
|
|
5885
|
+
* @error {10001} 内部错误
|
|
5886
|
+
*/
|
|
5887
|
+
export function queryFilesByCategory(params: {
|
|
5888
|
+
/**
|
|
5889
|
+
* 状态筛选('PENDING_SUMMARY'=未总结+总结中 / 'SUMMARIZED');「所有文件」不要传
|
|
5890
|
+
* @since WearKit 3.3.0
|
|
5891
|
+
*/
|
|
5892
|
+
statuses?: string[]
|
|
5893
|
+
/**
|
|
5894
|
+
* 文件夹筛选(自建 folderId 或字面量 'UNFILED')
|
|
5895
|
+
* @since WearKit 3.3.0
|
|
5896
|
+
*/
|
|
5897
|
+
folderIds?: string[]
|
|
5898
|
+
/**
|
|
5899
|
+
* 来源筛选('PHONE' / 'PC' / 'HEADPHONE' / 'RECORDER_CARD')
|
|
5900
|
+
* @since WearKit 3.3.0
|
|
5901
|
+
*/
|
|
5902
|
+
sourceCategories?: string[]
|
|
5903
|
+
/**
|
|
5904
|
+
* 排序规则 0: fileId, 1: recordTime, 2: updateAt
|
|
5905
|
+
* @since WearKit 7.10.0
|
|
5906
|
+
*/
|
|
5907
|
+
orderBy: number
|
|
5908
|
+
/**
|
|
5909
|
+
* 0: desc, 1: asc
|
|
5910
|
+
* @since WearKit 7.10.0
|
|
5911
|
+
*/
|
|
5912
|
+
asc: number
|
|
5913
|
+
/**
|
|
5914
|
+
* 限制的长度
|
|
5915
|
+
* @since WearKit 7.10.0
|
|
5916
|
+
*/
|
|
5917
|
+
pageSize: number
|
|
5918
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
5919
|
+
complete?: () => void
|
|
5920
|
+
/** 接口调用成功的回调函数 */
|
|
5921
|
+
success?: (params: RecordTransferResult[]) => void
|
|
5922
|
+
/** 接口调用失败的回调函数 */
|
|
5923
|
+
fail?: (params: {
|
|
5924
|
+
/** 错误信息 */
|
|
5925
|
+
errorMsg: string
|
|
5926
|
+
/** 错误码 */
|
|
5927
|
+
errorCode: string | number
|
|
5928
|
+
/** 错误扩展 */
|
|
5929
|
+
innerError: {
|
|
5930
|
+
/** 错误扩展码 */
|
|
5931
|
+
errorCode: string | number
|
|
5932
|
+
/** 错误扩展信息 */
|
|
5933
|
+
errorMsg: string
|
|
5934
|
+
}
|
|
5935
|
+
}) => void
|
|
5936
|
+
}): void
|
|
5937
|
+
|
|
5702
5938
|
/**
|
|
5703
5939
|
* 监听微信授权代理事件
|
|
5704
5940
|
* @description.en Get WeChat authorization information.
|
|
@@ -5726,7 +5962,7 @@ declare namespace ty.wear {
|
|
|
5726
5962
|
* @since WearKit 1.0.0
|
|
5727
5963
|
* @remarks 注意:WearKit(2.1.0)起下该方法已过时,请使用ThirdAuthKit下同名方法
|
|
5728
5964
|
* @remarksEn Note: Deprecated since WearKit 2.1.0, use the same method in ThirdAuthKit.
|
|
5729
|
-
* @example
|
|
5965
|
+
* @example
|
|
5730
5966
|
* ```tsx
|
|
5731
5967
|
* const listener = function (res) { console.log(res) }
|
|
5732
5968
|
* ty.wear.onWechatAuthAgentEvent(listener)
|
|
@@ -5762,7 +5998,7 @@ declare namespace ty.wear {
|
|
|
5762
5998
|
* @description.en Stock sync status update event.
|
|
5763
5999
|
* @public
|
|
5764
6000
|
* @since WearKit 1.0.0
|
|
5765
|
-
* @example
|
|
6001
|
+
* @example
|
|
5766
6002
|
* ```tsx
|
|
5767
6003
|
* const listener = function (res) { console.log(res) }
|
|
5768
6004
|
* ty.wear.onStockSyncUpdate(listener)
|
|
@@ -5798,7 +6034,7 @@ declare namespace ty.wear {
|
|
|
5798
6034
|
* @description.en Progress callback for gain publishing.
|
|
5799
6035
|
* @public
|
|
5800
6036
|
* @since WearKit 1.0.0
|
|
5801
|
-
* @example
|
|
6037
|
+
* @example
|
|
5802
6038
|
* ```tsx
|
|
5803
6039
|
* const listener = function (res) { console.log(res) }
|
|
5804
6040
|
* ty.wear.onPublishGainsProgress(listener)
|
|
@@ -5834,7 +6070,7 @@ declare namespace ty.wear {
|
|
|
5834
6070
|
* @description.en File transfer progress.
|
|
5835
6071
|
* @public
|
|
5836
6072
|
* @since WearKit 1.1.3
|
|
5837
|
-
* @example
|
|
6073
|
+
* @example
|
|
5838
6074
|
* ```tsx
|
|
5839
6075
|
* const listener = function (res) { console.log(res) }
|
|
5840
6076
|
* ty.wear.onOfflineFilesProgressEvent(listener)
|
|
@@ -5870,7 +6106,7 @@ declare namespace ty.wear {
|
|
|
5870
6106
|
* @description.en Recording finished callback.
|
|
5871
6107
|
* @public
|
|
5872
6108
|
* @since WearKit 1.0.0
|
|
5873
|
-
* @example
|
|
6109
|
+
* @example
|
|
5874
6110
|
* ```tsx
|
|
5875
6111
|
* const listener = function (res) { console.log(res) }
|
|
5876
6112
|
* ty.wear.onRecordFinishEvent(listener)
|
|
@@ -5906,7 +6142,7 @@ declare namespace ty.wear {
|
|
|
5906
6142
|
* @description.en Recording amplitude event.
|
|
5907
6143
|
* @public
|
|
5908
6144
|
* @since WearKit 1.0.0
|
|
5909
|
-
* @example
|
|
6145
|
+
* @example
|
|
5910
6146
|
* ```tsx
|
|
5911
6147
|
* const listener = function (res) { console.log(res) }
|
|
5912
6148
|
* ty.wear.onRecordAmplitudeUpdateEvent(listener)
|
|
@@ -5950,7 +6186,7 @@ declare namespace ty.wear {
|
|
|
5950
6186
|
* @description.en Recording status change event.
|
|
5951
6187
|
* @public
|
|
5952
6188
|
* @since WearKit 1.0.0
|
|
5953
|
-
* @example
|
|
6189
|
+
* @example
|
|
5954
6190
|
* ```tsx
|
|
5955
6191
|
* const listener = function (res) { console.log(res) }
|
|
5956
6192
|
* ty.wear.onRecordStatusUpdateEvent(listener)
|
|
@@ -5986,7 +6222,7 @@ declare namespace ty.wear {
|
|
|
5986
6222
|
* @description.en Active input source switch event.
|
|
5987
6223
|
* @public
|
|
5988
6224
|
* @since WearKit 1.3.0
|
|
5989
|
-
* @example
|
|
6225
|
+
* @example
|
|
5990
6226
|
* ```tsx
|
|
5991
6227
|
* const listener = function (res) { console.log(res) }
|
|
5992
6228
|
* ty.wear.onRecordSwitchAudioSourceEvent(listener)
|
|
@@ -6022,7 +6258,7 @@ declare namespace ty.wear {
|
|
|
6022
6258
|
* @description.en Quick entry add/set result event.
|
|
6023
6259
|
* @public
|
|
6024
6260
|
* @since WearKit 2.1.0
|
|
6025
|
-
* @example
|
|
6261
|
+
* @example
|
|
6026
6262
|
* ```tsx
|
|
6027
6263
|
* const listener = function (res) { console.log(res) }
|
|
6028
6264
|
* ty.wear.onQuickEntryAddEvent(listener)
|
|
@@ -6058,7 +6294,7 @@ declare namespace ty.wear {
|
|
|
6058
6294
|
* @description.en Recording transcription finish error callback.
|
|
6059
6295
|
* @public
|
|
6060
6296
|
* @since WearKit 1.0.0
|
|
6061
|
-
* @example
|
|
6297
|
+
* @example
|
|
6062
6298
|
* ```tsx
|
|
6063
6299
|
* const listener = function (res) { console.log(res) }
|
|
6064
6300
|
* ty.wear.onRecordTransferFinishEvent(listener)
|
|
@@ -6094,7 +6330,7 @@ declare namespace ty.wear {
|
|
|
6094
6330
|
* @description.en Recording transcription amplitude update event.
|
|
6095
6331
|
* @public
|
|
6096
6332
|
* @since WearKit 1.0.0
|
|
6097
|
-
* @example
|
|
6333
|
+
* @example
|
|
6098
6334
|
* ```tsx
|
|
6099
6335
|
* const listener = function (res) { console.log(res) }
|
|
6100
6336
|
* ty.wear.onRecordTransferAmplitudeUpdateEvent(listener)
|
|
@@ -6130,7 +6366,7 @@ declare namespace ty.wear {
|
|
|
6130
6366
|
* @description.en Recording transcription status change event.
|
|
6131
6367
|
* @public
|
|
6132
6368
|
* @since WearKit 1.0.0
|
|
6133
|
-
* @example
|
|
6369
|
+
* @example
|
|
6134
6370
|
* ```tsx
|
|
6135
6371
|
* const listener = function (res) { console.log(res) }
|
|
6136
6372
|
* ty.wear.onRecordTransferStatusUpdateEvent(listener)
|
|
@@ -6166,7 +6402,7 @@ declare namespace ty.wear {
|
|
|
6166
6402
|
* @description.en Recording transcription file upload progress event.
|
|
6167
6403
|
* @public
|
|
6168
6404
|
* @since WearKit 1.2.0
|
|
6169
|
-
* @example
|
|
6405
|
+
* @example
|
|
6170
6406
|
* ```tsx
|
|
6171
6407
|
* const listener = function (res) { console.log(res) }
|
|
6172
6408
|
* ty.wear.onRecordTransferFileUploadEvent(listener)
|
|
@@ -6202,7 +6438,7 @@ declare namespace ty.wear {
|
|
|
6202
6438
|
* @description.en Text translation TTS complete event.
|
|
6203
6439
|
* @public
|
|
6204
6440
|
* @since WearKit 1.4.0
|
|
6205
|
-
* @example
|
|
6441
|
+
* @example
|
|
6206
6442
|
* ```tsx
|
|
6207
6443
|
* const listener = function (res) { console.log(res) }
|
|
6208
6444
|
* ty.wear.onTextTranslateTtsCompleteEvent(listener)
|
|
@@ -6241,7 +6477,7 @@ declare namespace ty.wear {
|
|
|
6241
6477
|
* @description.en Recording real-time transcription status change event.
|
|
6242
6478
|
* @public
|
|
6243
6479
|
* @since WearKit 1.0.0
|
|
6244
|
-
* @example
|
|
6480
|
+
* @example
|
|
6245
6481
|
* ```tsx
|
|
6246
6482
|
* const listener = function (res) { console.log(res) }
|
|
6247
6483
|
* ty.wear.onRecordTransferRealTimeRecognizeStatusUpdateEvent(listener)
|
|
@@ -6277,7 +6513,7 @@ declare namespace ty.wear {
|
|
|
6277
6513
|
* @description.en Recording scene battery change event.
|
|
6278
6514
|
* @public
|
|
6279
6515
|
* @since WearKit 1.7.0
|
|
6280
|
-
* @example
|
|
6516
|
+
* @example
|
|
6281
6517
|
* ```tsx
|
|
6282
6518
|
* const listener = function (res) { console.log(res) }
|
|
6283
6519
|
* ty.wear.onRecordBatteryChangeEvent(listener)
|
|
@@ -6313,7 +6549,7 @@ declare namespace ty.wear {
|
|
|
6313
6549
|
* @description.en Real-time transcription/simultaneous interpretation recording quality (SNR) change event.
|
|
6314
6550
|
* @public
|
|
6315
6551
|
* @since WearKit 1.7.0
|
|
6316
|
-
* @example
|
|
6552
|
+
* @example
|
|
6317
6553
|
* ```tsx
|
|
6318
6554
|
* const listener = function (res) { console.log(res) }
|
|
6319
6555
|
* ty.wear.onRecordQualityChangeEvent(listener)
|
|
@@ -6352,7 +6588,7 @@ declare namespace ty.wear {
|
|
|
6352
6588
|
* @description.en Classic Bluetooth device/Pro earphone connection status change event.
|
|
6353
6589
|
* @public
|
|
6354
6590
|
* @since WearKit 1.8.0
|
|
6355
|
-
* @example
|
|
6591
|
+
* @example
|
|
6356
6592
|
* ```tsx
|
|
6357
6593
|
* const listener = function (res) { console.log(res) }
|
|
6358
6594
|
* ty.wear.onEarPhoneBTConnectedStatusChangeEvent(listener)
|
|
@@ -6388,7 +6624,7 @@ declare namespace ty.wear {
|
|
|
6388
6624
|
* @description.en Cloud sync switch status event.
|
|
6389
6625
|
* @public
|
|
6390
6626
|
* @since WearKit 1.5.0
|
|
6391
|
-
* @example
|
|
6627
|
+
* @example
|
|
6392
6628
|
* ```tsx
|
|
6393
6629
|
* const listener = function (res) { console.log(res) }
|
|
6394
6630
|
* ty.wear.onCloudSyncSwitchStatusEvent(listener)
|
|
@@ -6424,7 +6660,7 @@ declare namespace ty.wear {
|
|
|
6424
6660
|
* @description.en Sync status event.
|
|
6425
6661
|
* @public
|
|
6426
6662
|
* @since WearKit 1.6.0
|
|
6427
|
-
* @example
|
|
6663
|
+
* @example
|
|
6428
6664
|
* ```tsx
|
|
6429
6665
|
* const listener = function (res) { console.log(res) }
|
|
6430
6666
|
* ty.wear.onPartialRecordUpdate(listener)
|
|
@@ -6460,7 +6696,7 @@ declare namespace ty.wear {
|
|
|
6460
6696
|
* @description.en File list status refresh event.
|
|
6461
6697
|
* @public
|
|
6462
6698
|
* @since WearKit 1.5.0
|
|
6463
|
-
* @example
|
|
6699
|
+
* @example
|
|
6464
6700
|
* ```tsx
|
|
6465
6701
|
* const listener = function (res) { console.log(res) }
|
|
6466
6702
|
* ty.wear.onFileListUpdateStatusEvent(listener)
|
|
@@ -6496,7 +6732,7 @@ declare namespace ty.wear {
|
|
|
6496
6732
|
* @description.en File details status refresh event.
|
|
6497
6733
|
* @public
|
|
6498
6734
|
* @since WearKit 1.5.0
|
|
6499
|
-
* @example
|
|
6735
|
+
* @example
|
|
6500
6736
|
* ```tsx
|
|
6501
6737
|
* const listener = function (res) { console.log(res) }
|
|
6502
6738
|
* ty.wear.onFileDetailUpdateStatusEvent(listener)
|
|
@@ -6532,7 +6768,7 @@ declare namespace ty.wear {
|
|
|
6532
6768
|
* @description.en Mini-program push refresh event.
|
|
6533
6769
|
* @public
|
|
6534
6770
|
* @since WearKit 1.6.23
|
|
6535
|
-
* @example
|
|
6771
|
+
* @example
|
|
6536
6772
|
* ```tsx
|
|
6537
6773
|
* const listener = function (res) { console.log(res) }
|
|
6538
6774
|
* ty.wear.onPushRouteInfoEvent(listener)
|
|
@@ -6568,7 +6804,7 @@ declare namespace ty.wear {
|
|
|
6568
6804
|
* @description.en File import status event.
|
|
6569
6805
|
* @public
|
|
6570
6806
|
* @since WearKit 1.7.0
|
|
6571
|
-
* @example
|
|
6807
|
+
* @example
|
|
6572
6808
|
* ```tsx
|
|
6573
6809
|
* const listener = function (res) { console.log(res) }
|
|
6574
6810
|
* ty.wear.onFileImportStatusEvent(listener)
|
|
@@ -6604,7 +6840,7 @@ declare namespace ty.wear {
|
|
|
6604
6840
|
* @description.en File merge status event.
|
|
6605
6841
|
* @public
|
|
6606
6842
|
* @since WearKit 2.0.0
|
|
6607
|
-
* @example
|
|
6843
|
+
* @example
|
|
6608
6844
|
* ```tsx
|
|
6609
6845
|
* const listener = function (res) { console.log(res) }
|
|
6610
6846
|
* ty.wear.onFileMergeStatusEvent(listener)
|
|
@@ -6617,6 +6853,42 @@ declare namespace ty.wear {
|
|
|
6617
6853
|
listener: (params: FileMergeStatusEvent) => void
|
|
6618
6854
|
): void
|
|
6619
6855
|
|
|
6856
|
+
/**
|
|
6857
|
+
* 文件夹变更事件(delete / update)
|
|
6858
|
+
* @description.en Folder change event. type=delete removes a folder; type=update renames and/or changes associated files. folderIds lists all affected folders.
|
|
6859
|
+
* @public
|
|
6860
|
+
* @since WearKit 3.3.0
|
|
6861
|
+
* @example 基础用法
|
|
6862
|
+
* ```tsx
|
|
6863
|
+
* ty.wear.onFolderChangeEvent((response) => {
|
|
6864
|
+
* console.log('onFolderChangeEvent', response.type, response.folderIds, response.folderName);
|
|
6865
|
+
* });
|
|
6866
|
+
* ```
|
|
6867
|
+
* @see https://developer.tuya.com/
|
|
6868
|
+
* @platform iOS Android
|
|
6869
|
+
*/
|
|
6870
|
+
export function onFolderChangeEvent(
|
|
6871
|
+
listener: (params: FolderChangeEvent) => void
|
|
6872
|
+
): void
|
|
6873
|
+
|
|
6874
|
+
/**
|
|
6875
|
+
* 文件夹变更事件(delete / update)
|
|
6876
|
+
* @description.en Folder change event. type=delete removes a folder; type=update renames and/or changes associated files. folderIds lists all affected folders.
|
|
6877
|
+
* @public
|
|
6878
|
+
* @since WearKit 3.3.0
|
|
6879
|
+
* @example
|
|
6880
|
+
* ```tsx
|
|
6881
|
+
* const listener = function (res) { console.log(res) }
|
|
6882
|
+
* ty.wear.onFolderChangeEvent(listener)
|
|
6883
|
+
* ty.wear.offFolderChangeEvent(listener)
|
|
6884
|
+
* ```
|
|
6885
|
+
* @see https://developer.tuya.com/
|
|
6886
|
+
* @platform iOS Android
|
|
6887
|
+
*/
|
|
6888
|
+
export function offFolderChangeEvent(
|
|
6889
|
+
listener: (params: FolderChangeEvent) => void
|
|
6890
|
+
): void
|
|
6891
|
+
|
|
6620
6892
|
/**
|
|
6621
6893
|
* QQ音乐授权请求参数
|
|
6622
6894
|
* @since WearKit 0.0.5
|
|
@@ -8484,6 +8756,16 @@ declare namespace ty.wear {
|
|
|
8484
8756
|
* @since WearKit 3.0.0
|
|
8485
8757
|
*/
|
|
8486
8758
|
businessType: number
|
|
8759
|
+
/**
|
|
8760
|
+
* 业务类型 0: 主动暂停, 1: 应用内暂停 2: 应用外暂停
|
|
8761
|
+
* @since WearKit 7.10.0
|
|
8762
|
+
*/
|
|
8763
|
+
pauseType: number
|
|
8764
|
+
/**
|
|
8765
|
+
* 当前任务第几次录音启动:首次启动为 0,每次恢复成功递增(App 端维护)
|
|
8766
|
+
* @since WearKit 7.10.0
|
|
8767
|
+
*/
|
|
8768
|
+
recordingStartCount: number
|
|
8487
8769
|
}
|
|
8488
8770
|
|
|
8489
8771
|
/**
|
|
@@ -8729,6 +9011,16 @@ declare namespace ty.wear {
|
|
|
8729
9011
|
* @since WearKit 1.0.0
|
|
8730
9012
|
*/
|
|
8731
9013
|
isStoping: boolean
|
|
9014
|
+
/**
|
|
9015
|
+
* 暂停类型 0: 主动暂停, 1: 应用内暂停, 2: 应用外暂停
|
|
9016
|
+
* @since WearKit 7.10.0
|
|
9017
|
+
*/
|
|
9018
|
+
pauseType: number
|
|
9019
|
+
/**
|
|
9020
|
+
* 当前任务第几次录音启动:首次启动为 0,每次恢复成功递增(App 端维护)
|
|
9021
|
+
* @since WearKit 7.10.0
|
|
9022
|
+
*/
|
|
9023
|
+
recordingStartCount: number
|
|
8732
9024
|
}
|
|
8733
9025
|
|
|
8734
9026
|
/**
|
|
@@ -9388,6 +9680,16 @@ declare namespace ty.wear {
|
|
|
9388
9680
|
* @since WearKit 1.9.1
|
|
9389
9681
|
*/
|
|
9390
9682
|
linkShared: number
|
|
9683
|
+
/**
|
|
9684
|
+
* 转写是否已编辑,0未编辑、1已编辑
|
|
9685
|
+
* @since WearKit 3.3.0
|
|
9686
|
+
*/
|
|
9687
|
+
transcriptEdited?: number
|
|
9688
|
+
/**
|
|
9689
|
+
* 总结是否已编辑,0未编辑、1已编辑
|
|
9690
|
+
* @since WearKit 3.3.0
|
|
9691
|
+
*/
|
|
9692
|
+
summaryEdited?: number
|
|
9391
9693
|
/**
|
|
9392
9694
|
* 离线文件上传进度,默认0,范围0-100
|
|
9393
9695
|
* @since WearKit 1.9.1
|
|
@@ -9408,6 +9710,11 @@ declare namespace ty.wear {
|
|
|
9408
9710
|
* @since WearKit 3.0.0
|
|
9409
9711
|
*/
|
|
9410
9712
|
summaryImageStatus?: number
|
|
9713
|
+
/**
|
|
9714
|
+
* 文件夹id
|
|
9715
|
+
* @since WearKit 7.10.0
|
|
9716
|
+
*/
|
|
9717
|
+
folderId?: string
|
|
9411
9718
|
}
|
|
9412
9719
|
|
|
9413
9720
|
/**
|
|
@@ -10323,6 +10630,16 @@ declare namespace ty.wear {
|
|
|
10323
10630
|
* @since WearKit 3.0.0
|
|
10324
10631
|
*/
|
|
10325
10632
|
summaryImageUrl?: string
|
|
10633
|
+
/**
|
|
10634
|
+
* 转写是否已编辑,0未编辑、1已编辑
|
|
10635
|
+
* @since WearKit 3.3.0
|
|
10636
|
+
*/
|
|
10637
|
+
transcriptEdited?: number
|
|
10638
|
+
/**
|
|
10639
|
+
* 总结是否已编辑,0未编辑、1已编辑
|
|
10640
|
+
* @since WearKit 3.3.0
|
|
10641
|
+
*/
|
|
10642
|
+
summaryEdited?: number
|
|
10326
10643
|
}
|
|
10327
10644
|
|
|
10328
10645
|
/**
|
|
@@ -10399,6 +10716,213 @@ declare namespace ty.wear {
|
|
|
10399
10716
|
extraInfo: string
|
|
10400
10717
|
}
|
|
10401
10718
|
|
|
10719
|
+
/**
|
|
10720
|
+
* 文件夹操作入参(operateFolder)
|
|
10721
|
+
* @since WearKit 3.3.0
|
|
10722
|
+
*/
|
|
10723
|
+
export interface OperateFolderParams {
|
|
10724
|
+
/**
|
|
10725
|
+
* 操作类型
|
|
10726
|
+
* 'add': 新建
|
|
10727
|
+
* 'rename': 重命名
|
|
10728
|
+
* 'delete': 删除
|
|
10729
|
+
* 'move': 移动
|
|
10730
|
+
* @since WearKit 3.3.0
|
|
10731
|
+
*/
|
|
10732
|
+
type: string
|
|
10733
|
+
/**
|
|
10734
|
+
* 文件夹名称(add / rename 必填)
|
|
10735
|
+
* @since WearKit 3.3.0
|
|
10736
|
+
*/
|
|
10737
|
+
folderName?: string
|
|
10738
|
+
/**
|
|
10739
|
+
* 文件夹业务 id(rename / delete 必填)
|
|
10740
|
+
* @since WearKit 3.3.0
|
|
10741
|
+
*/
|
|
10742
|
+
folderId?: string
|
|
10743
|
+
/**
|
|
10744
|
+
* 移动的录音 id 列表(move 必填,长度 1~100)
|
|
10745
|
+
* @since WearKit 3.3.0
|
|
10746
|
+
*/
|
|
10747
|
+
recordIds?: string[]
|
|
10748
|
+
/**
|
|
10749
|
+
* 目标文件夹 id(move;不传/空 = 移回未分类)
|
|
10750
|
+
* @since WearKit 3.3.0
|
|
10751
|
+
*/
|
|
10752
|
+
targetFolderId?: string
|
|
10753
|
+
}
|
|
10754
|
+
|
|
10755
|
+
/**
|
|
10756
|
+
* 文件夹操作结果(add / rename)
|
|
10757
|
+
* @since WearKit 3.3.0
|
|
10758
|
+
*/
|
|
10759
|
+
export interface FolderOperateResult {
|
|
10760
|
+
/**
|
|
10761
|
+
* 文件夹业务 id
|
|
10762
|
+
* @since WearKit 3.3.0
|
|
10763
|
+
*/
|
|
10764
|
+
folderId: string
|
|
10765
|
+
/**
|
|
10766
|
+
* 文件夹名称
|
|
10767
|
+
* @since WearKit 3.3.0
|
|
10768
|
+
*/
|
|
10769
|
+
folderName: string
|
|
10770
|
+
/**
|
|
10771
|
+
* delete / move 时为 true
|
|
10772
|
+
* @since WearKit 3.3.0
|
|
10773
|
+
*/
|
|
10774
|
+
result?: boolean
|
|
10775
|
+
}
|
|
10776
|
+
|
|
10777
|
+
/**
|
|
10778
|
+
* 状态计数项
|
|
10779
|
+
* @since WearKit 3.3.0
|
|
10780
|
+
*/
|
|
10781
|
+
export interface CategoryOverviewStatusCountItem {
|
|
10782
|
+
/**
|
|
10783
|
+
* 状态 id
|
|
10784
|
+
* 'ALL': 所有文件
|
|
10785
|
+
* 'PENDING_SUMMARY': 待总结(含未总结、总结中)
|
|
10786
|
+
* 'SUMMARIZED': 已总结
|
|
10787
|
+
* @since WearKit 3.3.0
|
|
10788
|
+
*/
|
|
10789
|
+
statusId: string
|
|
10790
|
+
/**
|
|
10791
|
+
* 文件数量
|
|
10792
|
+
* @since WearKit 3.3.0
|
|
10793
|
+
*/
|
|
10794
|
+
count: number
|
|
10795
|
+
}
|
|
10796
|
+
|
|
10797
|
+
/**
|
|
10798
|
+
* 文件夹计数项
|
|
10799
|
+
* @since WearKit 3.3.0
|
|
10800
|
+
*/
|
|
10801
|
+
export interface CategoryOverviewFolderCountItem {
|
|
10802
|
+
/**
|
|
10803
|
+
* 文件夹业务 id(未分类为字面量 'UNFILED')
|
|
10804
|
+
* @since WearKit 3.3.0
|
|
10805
|
+
*/
|
|
10806
|
+
folderId: string
|
|
10807
|
+
/**
|
|
10808
|
+
* 文件夹名称
|
|
10809
|
+
* @since WearKit 3.3.0
|
|
10810
|
+
*/
|
|
10811
|
+
folderName: string
|
|
10812
|
+
/**
|
|
10813
|
+
* 文件数量
|
|
10814
|
+
* @since WearKit 3.3.0
|
|
10815
|
+
*/
|
|
10816
|
+
count: number
|
|
10817
|
+
}
|
|
10818
|
+
|
|
10819
|
+
/**
|
|
10820
|
+
* 来源计数项
|
|
10821
|
+
* @since WearKit 3.3.0
|
|
10822
|
+
*/
|
|
10823
|
+
export interface CategoryOverviewSourceCountItem {
|
|
10824
|
+
/**
|
|
10825
|
+
* 来源 id
|
|
10826
|
+
* 'PHONE': 手机
|
|
10827
|
+
* 'PC': PC
|
|
10828
|
+
* 'HEADPHONE': 耳机
|
|
10829
|
+
* 'RECORDER_CARD': 录音卡
|
|
10830
|
+
* @since WearKit 3.3.0
|
|
10831
|
+
*/
|
|
10832
|
+
sourceGroupId: string
|
|
10833
|
+
/**
|
|
10834
|
+
* 文件数量
|
|
10835
|
+
* @since WearKit 3.3.0
|
|
10836
|
+
*/
|
|
10837
|
+
count: number
|
|
10838
|
+
}
|
|
10839
|
+
|
|
10840
|
+
/**
|
|
10841
|
+
* 分类总览结果(categoryOverview,纯本地聚合)
|
|
10842
|
+
* @since WearKit 3.3.0
|
|
10843
|
+
*/
|
|
10844
|
+
export interface CategoryOverviewResult {
|
|
10845
|
+
/**
|
|
10846
|
+
* 状态三分组(固定 3 项,建议顺序:ALL → PENDING_SUMMARY → SUMMARIZED)
|
|
10847
|
+
* @since WearKit 3.3.0
|
|
10848
|
+
*/
|
|
10849
|
+
statusGroup: CategoryOverviewStatusCountItem[]
|
|
10850
|
+
/**
|
|
10851
|
+
* 文件夹列表(含未分类,首项 folderId='UNFILED' 为未分类,其后为自建夹)
|
|
10852
|
+
* @since WearKit 3.3.0
|
|
10853
|
+
*/
|
|
10854
|
+
folders: CategoryOverviewFolderCountItem[]
|
|
10855
|
+
/**
|
|
10856
|
+
* 来源四类目(固定 4 项:PHONE / PC / HEADPHONE / RECORDER_CARD)
|
|
10857
|
+
* @since WearKit 3.3.0
|
|
10858
|
+
*/
|
|
10859
|
+
sourceGroup: CategoryOverviewSourceCountItem[]
|
|
10860
|
+
}
|
|
10861
|
+
|
|
10862
|
+
/**
|
|
10863
|
+
* 按范围查询文件列表入参(queryFilesByCategory,纯本地)
|
|
10864
|
+
* @since WearKit 3.3.0
|
|
10865
|
+
*/
|
|
10866
|
+
export interface QueryFilesByCategoryParams {
|
|
10867
|
+
/**
|
|
10868
|
+
* 状态筛选('PENDING_SUMMARY'=未总结+总结中 / 'SUMMARIZED');「所有文件」不要传
|
|
10869
|
+
* @since WearKit 3.3.0
|
|
10870
|
+
*/
|
|
10871
|
+
statuses?: string[]
|
|
10872
|
+
/**
|
|
10873
|
+
* 文件夹筛选(自建 folderId 或字面量 'UNFILED')
|
|
10874
|
+
* @since WearKit 3.3.0
|
|
10875
|
+
*/
|
|
10876
|
+
folderIds?: string[]
|
|
10877
|
+
/**
|
|
10878
|
+
* 来源筛选('PHONE' / 'PC' / 'HEADPHONE' / 'RECORDER_CARD')
|
|
10879
|
+
* @since WearKit 3.3.0
|
|
10880
|
+
*/
|
|
10881
|
+
sourceCategories?: string[]
|
|
10882
|
+
/**
|
|
10883
|
+
* 排序规则 0: fileId, 1: recordTime, 2: updateAt
|
|
10884
|
+
* @since WearKit 7.10.0
|
|
10885
|
+
*/
|
|
10886
|
+
orderBy: number
|
|
10887
|
+
/**
|
|
10888
|
+
* 0: desc, 1: asc
|
|
10889
|
+
* @since WearKit 7.10.0
|
|
10890
|
+
*/
|
|
10891
|
+
asc: number
|
|
10892
|
+
/**
|
|
10893
|
+
* 限制的长度
|
|
10894
|
+
* @since WearKit 7.10.0
|
|
10895
|
+
*/
|
|
10896
|
+
pageSize: number
|
|
10897
|
+
}
|
|
10898
|
+
|
|
10899
|
+
/**
|
|
10900
|
+
* 文件夹变更事件
|
|
10901
|
+
* 仅处理 delete / update;add 走全量 folder.file.list,不派发本事件
|
|
10902
|
+
* @since WearKit 3.3.0
|
|
10903
|
+
*/
|
|
10904
|
+
export interface FolderChangeEvent {
|
|
10905
|
+
/**
|
|
10906
|
+
* 变更类型
|
|
10907
|
+
* delete: 删除当前文件夹
|
|
10908
|
+
* update: 更新文件夹名称,和/或更新关联文件列表
|
|
10909
|
+
* @since WearKit 3.3.0
|
|
10910
|
+
*/
|
|
10911
|
+
type: string
|
|
10912
|
+
/**
|
|
10913
|
+
* 涉及变更的文件夹 id 列表(必填)
|
|
10914
|
+
* delete: 被删夹 id
|
|
10915
|
+
* update: 所有受影响夹 id(改名仅当前夹;移动含 from/to)
|
|
10916
|
+
* @since WearKit 3.3.0
|
|
10917
|
+
*/
|
|
10918
|
+
folderIds: string[]
|
|
10919
|
+
/**
|
|
10920
|
+
* 改名后的最新名称(update 且含改名时建议带)
|
|
10921
|
+
* @since WearKit 3.3.0
|
|
10922
|
+
*/
|
|
10923
|
+
folderName?: string
|
|
10924
|
+
}
|
|
10925
|
+
|
|
10402
10926
|
/**
|
|
10403
10927
|
* 频率
|
|
10404
10928
|
* @since WearKit 0.0.2
|