@ray-js/api 1.5.22 → 1.5.24

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.
@@ -179,80 +179,6 @@ declare namespace ty.home {
179
179
  }) => void
180
180
  }): void
181
181
 
182
- // /**
183
- // * 验证码校验成功
184
- // */
185
- // export function onTicketSuccess(params?: {
186
- // /** ticket */
187
- // map?: Record<string, string>
188
- // complete?: () => void
189
- // success?: (params: {
190
- // /** ticket */
191
- // map?: Record<string, string>
192
- // }) => void
193
- // fail?: (params: {
194
- // errorMsg: string
195
- // errorCode: string | number
196
- // innerError: {
197
- // errorCode: string | number
198
- // errorMsg: string
199
- // }
200
- // }) => void
201
- // }): void
202
-
203
- // /**
204
- // * 【废弃】打开推荐场景详情页面
205
- // *请用deviceKit包下同名方法替代
206
- // *详细文档链接:https://wiki.tuya-inc.com:7799/page/1456192108871295013
207
- // */
208
- // export function openRecommendSceneDetail(params: {
209
- // /** 来源 */
210
- // source: string
211
- // /** 场景模型 */
212
- // sceneModel: Record<string, any>
213
- // complete?: () => void
214
- // success?: (params: {
215
- // /** 返回状态,默认返回 true */
216
- // status?: boolean
217
- // /** 成功返回的类型。0-未操作,1-保存成功,2-点击不感兴趣 */
218
- // type: number
219
- // /** 返回的场景数据,可能为空 */
220
- // data?: Record<string, any>
221
- // }) => void
222
- // fail?: (params: {
223
- // errorMsg: string
224
- // errorCode: string | number
225
- // innerError: {
226
- // errorCode: string | number
227
- // errorMsg: string
228
- // }
229
- // }) => void
230
- // }): void
231
-
232
- // /**
233
- // * 【废弃】跳转一键执行和自动化页面
234
- // *请用deviceKit包下同名方法替代
235
- // */
236
- // export function openDeviceExecutionAndAnutomation(params: {
237
- // /**
238
- // * deviceId
239
- // * 设备 id
240
- // */
241
- // deviceId: string
242
- // /** 页面标题,Android 需要 */
243
- // title?: string
244
- // complete?: () => void
245
- // success?: (params: null) => void
246
- // fail?: (params: {
247
- // errorMsg: string
248
- // errorCode: string | number
249
- // innerError: {
250
- // errorCode: string | number
251
- // errorMsg: string
252
- // }
253
- // }) => void
254
- // }): void
255
-
256
182
  export type RoomData = {
257
183
  /** 房间id */
258
184
  roomId: number
@@ -0,0 +1,109 @@
1
+ // api云能力扩展
2
+ declare namespace ty {
3
+ // #region 获取扫地机的历史地图
4
+ type GetMultipleMapFilesParams = {
5
+ //设备id
6
+ devId: string
7
+ }
8
+
9
+ type GetMultipleMapFilesResponse = {
10
+ datas: {
11
+ bucket: string // 存储文件的存储桶
12
+ extend: string // 文件的附加信息
13
+ time: number // 文件的时间戳
14
+ id: number // 文件的唯一标识符
15
+ file: string // 文件路径或路径
16
+ devId: string // 与文件关联的设备ID
17
+ fileType: string // 文件类型
18
+ }[] // 历史地图列表
19
+ totalCount: number // 数据总数
20
+ }
21
+
22
+ /**
23
+ * 获取扫地机的历史地图
24
+ * @returns 获取扫地机的历史地图结果的 Promise
25
+ */
26
+ export function getMultipleMapFiles(
27
+ params: GetMultipleMapFilesParams
28
+ ): Promise<GetMultipleMapFilesResponse>
29
+
30
+ // #region 获取清扫记录列表
31
+ type GetCleaningRecordsParams = {
32
+ startTime: number // 开始时间
33
+ endTime: number // 结束时间
34
+ limit: number // 返回的数据长度限制
35
+ offset: number // 偏移量
36
+ devId: string // 设备Id
37
+ fileType?: string // 可选参数,默认'pic'
38
+ }
39
+
40
+ type GetCleaningRecordsResponse = {
41
+ datas: {
42
+ bucket: string
43
+ extend: string // 清扫信息
44
+ devId: string
45
+ file: string
46
+ time: number
47
+ id: number // 清扫记录的唯一ID
48
+ fileType: string
49
+ }[]
50
+ totalCount: number // 清扫记录总长度
51
+ }
52
+
53
+ export function getCleaningRecords(
54
+ params: GetCleaningRecordsParams
55
+ ): Promise<GetCleaningRecordsResponse>
56
+
57
+ // #region 删除清扫记录
58
+ type DeleteCleaningRecordParams = {
59
+ devId: string // 设备id
60
+ fileIds: number[] // 要删除的记录id
61
+ }
62
+
63
+ type DeleteCleaningRecordResponse = boolean
64
+
65
+ /**
66
+ * 删除清扫记录
67
+ * @returns 删除清扫记录结果的 Promise
68
+ */
69
+ function deleteCleaningRecord(
70
+ params: DeleteCleaningRecordParams
71
+ ): Promise<DeleteCleaningRecordResponse>
72
+
73
+ // #region 获取扫地机的语音包列表
74
+ type GetVoiceListParams = {
75
+ //设备id
76
+ devId: string
77
+ //设备id - 兼容
78
+ deviceId?: string
79
+ // 分页参数,一般配置的语言包不多,可以不是用分页查询,直接使用0
80
+ offset: number
81
+ // 每页大小,可以传入100
82
+ limit: number
83
+ }
84
+
85
+ type GetVoiceListResponse = {
86
+ datas: {
87
+ auditionUrl: string // 试听链接
88
+ desc?: string // 描述
89
+ extendData: {
90
+ extendId: number // 扩展ID,通过这个id与设备上报的语言包id进行对比,判断语音包是否使用中
91
+ version: string // 版本
92
+ }
93
+ id: number // ID
94
+ imgUrl: string // 图片链接
95
+ name: string // 名称
96
+ officialUrl: string // 官方链接
97
+ productId: string // 产品ID
98
+ region: string[] // 区域代码
99
+ }[] // 语音数据数组
100
+ pageNo: number // 页码
101
+ totalCount: number // 数据总数
102
+ }
103
+
104
+ /**
105
+ * 获取扫地机的语音包列表
106
+ * @returns 获取扫地机的语音包列表结果的 Promise
107
+ */
108
+ function getVoiceList(params: GetVoiceListParams): Promise<GetVoiceListResponse>
109
+ }
@@ -285,6 +285,7 @@ declare namespace ty {
285
285
  USER_DATA_PATH: string
286
286
  }
287
287
  }
288
+
288
289
  declare namespace WechatMiniprogram {
289
290
  interface Wx {
290
291
  requestCloud(params: RequestCloudParams): RequestCloudReturn
package/@types/api.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  /// <reference path="./all-kits.d.ts" />
2
2
  /// <reference path="./api-extend.d.ts" />
3
+ /// <reference path="./api-cloud.d.ts" />
@@ -0,0 +1,3 @@
1
+ export { getCleaningRecords, deleteCleaningRecord } from './record';
2
+ export { getVoiceList } from './voice';
3
+ export { getMultipleMapFiles } from './map';
@@ -0,0 +1,3 @@
1
+ export { getCleaningRecords, deleteCleaningRecord } from './record';
2
+ export { getVoiceList } from './voice';
3
+ export { getMultipleMapFiles } from './map';
@@ -0,0 +1,2 @@
1
+ declare const getMultipleMapFiles: typeof ty.getMultipleMapFiles;
2
+ export { getMultipleMapFiles };
@@ -0,0 +1,3 @@
1
+ import { factory } from '../../utils';
2
+ const getMultipleMapFiles = factory('getMultipleMapFiles');
3
+ export { getMultipleMapFiles };
@@ -0,0 +1,3 @@
1
+ declare const getCleaningRecords: typeof ty.getCleaningRecords;
2
+ declare const deleteCleaningRecord: typeof ty.deleteCleaningRecord;
3
+ export { getCleaningRecords, deleteCleaningRecord };
@@ -0,0 +1,4 @@
1
+ import { factory } from '../../utils';
2
+ const getCleaningRecords = factory('getCleaningRecords');
3
+ const deleteCleaningRecord = factory('deleteCleaningRecord');
4
+ export { getCleaningRecords, deleteCleaningRecord };
@@ -0,0 +1,2 @@
1
+ declare const getVoiceList: typeof ty.getVoiceList;
2
+ export { getVoiceList };
@@ -0,0 +1,3 @@
1
+ import { factory } from '../../utils';
2
+ const getVoiceList = factory('getVoiceList');
3
+ export { getVoiceList };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.5.22",
3
+ "version": "1.5.24",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.5.22",
33
- "@ray-js/router": "1.5.22",
32
+ "@ray-js/framework": "1.5.24",
33
+ "@ray-js/router": "1.5.24",
34
34
  "@ray-js/wechat": "^0.2.9",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.5.22",
39
+ "@ray-js/cli": "1.5.24",
40
40
  "art-template": "^4.13.2",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.2",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.com"
48
48
  },
49
- "gitHead": "a2fdbf3cd9d7518344d1e0f0ce6b95bacb237f4d"
49
+ "gitHead": "954dac21738de0ffad38ea5c7a00fb56149291f5"
50
50
  }