@ray-js/api 1.5.0-beta.12 → 1.5.1

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.
Files changed (145) hide show
  1. package/@types/BaseKit.d.ts +246 -126
  2. package/@types/BizKit.d.ts +1 -1
  3. package/@types/MapKit.d.ts +237 -1
  4. package/@types/MiniKit.d.ts +1 -1
  5. package/@types/OutdoorKit.d.ts +232 -0
  6. package/@types/P2PKit.d.ts +24 -2
  7. package/@types/all-kits.d.ts +1 -0
  8. package/@types/api-extend.d.ts +8 -2
  9. package/@types/index.d.ts +87 -0
  10. package/lib/{BaseKit-3.3.10.d.ts → BaseKit-3.11.0.d.ts} +1 -0
  11. package/lib/{BaseKit-3.3.10.js → BaseKit-3.11.0.js} +6 -2
  12. package/lib/BizKit-3.2.7.js +2 -1
  13. package/lib/DeviceKit-3.3.1.js +2 -1
  14. package/lib/HomeKit-3.1.4.js +2 -1
  15. package/lib/{MapKit-3.0.7.d.ts → MapKit-3.4.13.d.ts} +5 -0
  16. package/lib/{MapKit-3.0.7.js → MapKit-3.4.13.js} +19 -1
  17. package/lib/MiniKit-3.1.0.js +3 -2
  18. package/lib/OutdoorKit-1.0.4.d.ts +14 -0
  19. package/lib/OutdoorKit-1.0.4.js +39 -0
  20. package/lib/P2PKit-2.0.3.d.ts +1 -0
  21. package/lib/P2PKit-2.0.3.js +5 -1
  22. package/lib/PlayNetKit-1.1.3.d.ts +24 -25
  23. package/lib/PlayNetKit-1.1.3.js +2 -1
  24. package/lib/all-kits.d.ts +3 -2
  25. package/lib/all-kits.js +3 -2
  26. package/lib/cloud/alarm.js +2 -2
  27. package/lib/cloud/core.js +1 -1
  28. package/lib/cloud/device.d.ts +25 -1
  29. package/lib/cloud/device.js +20 -6
  30. package/lib/cloud/doorlock/README.md +62 -0
  31. package/lib/cloud/doorlock/auth.d.ts +235 -0
  32. package/lib/cloud/doorlock/auth.js +223 -0
  33. package/lib/cloud/doorlock/auth.md +323 -0
  34. package/lib/cloud/doorlock/device.d.ts +137 -0
  35. package/lib/cloud/doorlock/device.js +187 -0
  36. package/lib/cloud/doorlock/device.md +265 -0
  37. package/lib/cloud/doorlock/index.d.ts +10 -0
  38. package/lib/cloud/doorlock/index.js +20 -0
  39. package/lib/cloud/doorlock/log.d.ts +113 -0
  40. package/lib/cloud/doorlock/log.js +53 -0
  41. package/lib/cloud/doorlock/log.md +153 -0
  42. package/lib/cloud/doorlock/member-opmode.d.ts +121 -0
  43. package/lib/cloud/doorlock/member-opmode.js +104 -0
  44. package/lib/cloud/doorlock/member-opmode.md +279 -0
  45. package/lib/cloud/doorlock/member.d.ts +110 -0
  46. package/lib/cloud/doorlock/member.js +72 -0
  47. package/lib/cloud/doorlock/member.md +276 -0
  48. package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
  49. package/lib/cloud/doorlock/offline-pwd.js +67 -0
  50. package/lib/cloud/doorlock/offline-pwd.md +155 -0
  51. package/lib/cloud/doorlock/old.d.ts +36 -0
  52. package/lib/cloud/doorlock/old.js +102 -0
  53. package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
  54. package/lib/cloud/doorlock/temp-pwd.js +193 -0
  55. package/lib/cloud/doorlock/temp-pwd.md +362 -0
  56. package/lib/cloud/doorlock/unlock-method.d.ts +62 -0
  57. package/lib/cloud/doorlock/unlock-method.js +85 -0
  58. package/lib/cloud/doorlock/unlock-method.md +121 -0
  59. package/lib/cloud/doorlock/unlock.d.ts +89 -0
  60. package/lib/cloud/doorlock/unlock.js +76 -0
  61. package/lib/cloud/doorlock/unlock.md +222 -0
  62. package/lib/cloud/index.d.ts +4 -0
  63. package/lib/cloud/index.js +10 -1
  64. package/lib/cloud/interface.d.ts +39 -2
  65. package/lib/cloud/linkage.d.ts +8 -5
  66. package/lib/cloud/linkage.js +38 -17
  67. package/lib/cloud/outdoor.d.ts +15 -0
  68. package/lib/cloud/outdoor.js +25 -0
  69. package/lib/cloud/recipe/README.md +36 -0
  70. package/lib/cloud/recipe/basket.d.ts +220 -0
  71. package/lib/cloud/recipe/basket.js +328 -0
  72. package/lib/cloud/recipe/basket.md +431 -0
  73. package/lib/cloud/recipe/category-list.d.ts +71 -0
  74. package/lib/cloud/recipe/category-list.js +65 -0
  75. package/lib/cloud/recipe/category-list.md +132 -0
  76. package/lib/cloud/recipe/custom.d.ts +177 -0
  77. package/lib/cloud/recipe/custom.js +171 -0
  78. package/lib/cloud/recipe/custom.md +265 -0
  79. package/lib/cloud/recipe/index.d.ts +8 -0
  80. package/lib/cloud/recipe/index.js +8 -0
  81. package/lib/cloud/recipe/menu.d.ts +170 -0
  82. package/lib/cloud/recipe/menu.js +76 -0
  83. package/lib/cloud/recipe/menu.md +276 -0
  84. package/lib/cloud/recipe/query.d.ts +87 -0
  85. package/lib/cloud/recipe/query.js +101 -0
  86. package/lib/cloud/recipe/query.md +112 -0
  87. package/lib/cloud/recipe/record.d.ts +54 -0
  88. package/lib/cloud/recipe/record.js +87 -0
  89. package/lib/cloud/recipe/record.md +115 -0
  90. package/lib/cloud/recipe/score.d.ts +69 -0
  91. package/lib/cloud/recipe/score.js +106 -0
  92. package/lib/cloud/recipe/score.md +112 -0
  93. package/lib/cloud/recipe/star.d.ts +131 -0
  94. package/lib/cloud/recipe/star.js +151 -0
  95. package/lib/cloud/recipe/star.md +196 -0
  96. package/lib/cloud/recipe/types.d.ts +7 -0
  97. package/lib/cloud/recipe/types.js +0 -0
  98. package/lib/cloud/remoteGroup.d.ts +10 -0
  99. package/lib/cloud/remoteGroup.js +31 -0
  100. package/lib/cloud/statistic.js +9 -9
  101. package/lib/cloud/timer.js +14 -14
  102. package/lib/constants.js +1 -1
  103. package/lib/errorCode.d.ts +4 -0
  104. package/lib/errorCode.js +3 -0
  105. package/lib/getCdnUrl/index.d.ts +2 -2
  106. package/lib/getCdnUrl/index.js +1 -2
  107. package/lib/getCdnUrl/index.wechat.d.ts +2 -2
  108. package/lib/getCdnUrl/index.wechat.js +1 -2
  109. package/lib/getElementById/index.thing.js +1 -1
  110. package/lib/getElementById/index.wechat.js +1 -1
  111. package/lib/index.d.ts +1 -0
  112. package/lib/index.js +1 -0
  113. package/lib/nativeRouters/common.d.ts +15 -0
  114. package/lib/nativeRouters/common.js +38 -0
  115. package/lib/nativeRouters/device.d.ts +59 -0
  116. package/lib/nativeRouters/device.js +69 -0
  117. package/lib/nativeRouters/gw.d.ts +23 -0
  118. package/lib/nativeRouters/gw.js +27 -0
  119. package/lib/nativeRouters/index.d.ts +6 -1
  120. package/lib/nativeRouters/index.js +6 -1
  121. package/lib/nativeRouters/ipc.d.ts +30 -0
  122. package/lib/nativeRouters/ipc.js +44 -0
  123. package/lib/nativeRouters/outdoors.d.ts +47 -0
  124. package/lib/nativeRouters/outdoors.js +41 -0
  125. package/lib/nativeRouters/remoteGroup.d.ts +22 -0
  126. package/lib/nativeRouters/remoteGroup.js +11 -0
  127. package/lib/nativeRouters/root.d.ts +41 -0
  128. package/lib/nativeRouters/root.js +53 -0
  129. package/lib/openGroupCreate/index.js +3 -3
  130. package/lib/panel/i18n/index.d.ts +7 -6
  131. package/lib/panel/i18n/index.js +39 -23
  132. package/lib/panel/i18n/index.wechat.js +13 -12
  133. package/lib/panel/normalizeNetwork.js +1 -1
  134. package/lib/panel/publishDps.js +1 -1
  135. package/lib/redirectTo/index.js +1 -0
  136. package/lib/utils.d.ts +5 -2
  137. package/lib/utils.js +46 -20
  138. package/lib/utils.wechat.d.ts +3 -0
  139. package/lib/utils.wechat.js +22 -6
  140. package/lib/viewAPI.d.ts +1 -0
  141. package/lib/viewAPI.js +4 -3
  142. package/package.json +8 -7
  143. package/@types/PlayNetKit.d.ts +0 -444
  144. package/lib/nativeRouters/scene.d.ts +0 -34
  145. package/lib/nativeRouters/scene.js +0 -60
@@ -0,0 +1,323 @@
1
+ ## getLockAuthList
2
+
3
+ 获取授权记录列表。
4
+
5
+ ### 引入
6
+
7
+ > @ray-js/ray^1.5.0 以上版本可使用
8
+
9
+ ```js
10
+ import { getLockAuthList } from '@ray-js/ray'
11
+ ```
12
+
13
+ ### 参数
14
+
15
+ **AuthListParams**
16
+
17
+ | 属性 | 类型 | 必填 | 说明 |
18
+ | --------- | --------------- | ---- | ------------ |
19
+ | devId | `string` | 是 | 设备 ID |
20
+ | authTypes | `Array<string>` | 是 | 授权类型数组 |
21
+
22
+ ### 返回
23
+
24
+ **AuthListResult**
25
+
26
+ | 属性 | 类型 | 说明 |
27
+ | ---------- | ---------------------------- | ------------------------ |
28
+ | hasNext | `boolean` | 是否还有下一页 |
29
+ | totalCount | `number` | 总记录数 |
30
+ | datas | `Array<AuthListResultEntry>` | 授权记录列表结果条目数组 |
31
+
32
+ ### 函数定义示例
33
+
34
+ ```typescript
35
+ /**
36
+ * 获取授权记录列表
37
+ */
38
+ export function getLockAuthList(params: AuthListParams): Promise<AuthListResult>
39
+ ```
40
+
41
+ ## getInvalidAuthList
42
+
43
+ 获取已失效的授权记录列表。
44
+
45
+ ### 引入
46
+
47
+ > @ray-js/ray^1.5.0 以上版本可使用
48
+
49
+ ```js
50
+ import { getInvalidAuthList } from '@ray-js/ray'
51
+ ```
52
+
53
+ ### 参数
54
+
55
+ **InvalidAuthListParams**
56
+
57
+ | 属性 | 类型 | 必填 | 说明 |
58
+ | ------ | -------- | ---- | ---------- |
59
+ | devId | `string` | 是 | 设备 ID |
60
+ | offSet | `number` | 是 | 起始记录数 |
61
+ | limit | `number` | 是 | 每页个数 |
62
+
63
+ ### 返回
64
+
65
+ **InvalidAuthListResult**
66
+
67
+ `Array<InvalidAuthListResultEntry>`,包含已失效的授权记录列表结果条目。
68
+
69
+ ### 函数定义示例
70
+
71
+ ```typescript
72
+ /**
73
+ * 获取已失效的授权记录列表
74
+ */
75
+ export function getInvalidAuthList(params: InvalidAuthListParams): Promise<InvalidAuthListResult>
76
+ ```
77
+
78
+ ## clearInvalidAuthList
79
+
80
+ 清空已失效的授权记录列表。
81
+
82
+ ### 引入
83
+
84
+ > @ray-js/ray^1.5.0 以上版本可使用
85
+
86
+ ```js
87
+ import { clearInvalidAuthList } from '@ray-js/ray'
88
+ ```
89
+
90
+ ### 参数
91
+
92
+ **ClearInvalidAuthListParams**
93
+
94
+ | 属性 | 类型 | 必填 | 说明 |
95
+ | ----- | -------- | ---- | ------- |
96
+ | devId | `string` | 是 | 设备 ID |
97
+
98
+ ### 返回
99
+
100
+ **ClearInvalidAuthListResult**
101
+
102
+ `boolean`,表示是否成功清空列表。
103
+
104
+ ### 函数定义示例
105
+
106
+ ```typescript
107
+ /**
108
+ * 清空已失效的授权记录列表
109
+ */
110
+ export function clearInvalidAuthList(
111
+ params: ClearInvalidAuthListParams
112
+ ): Promise<ClearInvalidAuthListResult>
113
+ ```
114
+
115
+ ## addBluetoothAuth
116
+
117
+ 添加蓝牙授权记录。
118
+
119
+ ### 引入
120
+
121
+ > @ray-js/ray^1.5.0 以上版本可使用
122
+
123
+ ```js
124
+ import { addBluetoothAuth } from '@ray-js/ray'
125
+ ```
126
+
127
+ ### 参数
128
+
129
+ **AddBluetoothAuthParams**
130
+
131
+ | 属性 | 类型 | 必填 | 说明 |
132
+ | ------------- | ---------- | ---- | ---------------- |
133
+ | devId | `string` | 是 | 设备 ID |
134
+ | timeSetType | `number` | 是 | 时效类型 |
135
+ | effectiveTime | `number` | 是 | 生效时间 |
136
+ | invalidTime | `number` | 是 | 失效时间 |
137
+ | availTime | `number` | 否 | 可用次数 |
138
+ | name | `string` | 是 | 名称 |
139
+ | schedule | `Schedule` | 否 | 周期设置 |
140
+ | countryCode | `string` | 是 | 国家码 |
141
+ | account | `string` | 是 | 账号 |
142
+ | offlineUnlock | `boolean` | 是 | 是否支持离线解锁 |
143
+
144
+ ### 返回
145
+
146
+ **AddBluetoothAuthResult**
147
+
148
+ | 属性 | 类型 | 说明 |
149
+ | --------------- | --------- | ---------------------- |
150
+ | unlockBindingId | `string` | 临时蓝牙开锁对应的序号 |
151
+ | name | `string` | 名称 |
152
+ | userExist | `boolean` | 用户是否已注册涂鸦智能 |
153
+
154
+ ### 函数定义示例
155
+
156
+ ```typescript
157
+ /**
158
+ * 添加蓝牙授权记录
159
+ */
160
+ export function addBluetoothAuth(params: AddBluetoothAuthParams): Promise<AddBluetoothAuthResult>
161
+ ```
162
+
163
+ ## updateBluetoothKey
164
+
165
+ 修改蓝牙钥匙信息。
166
+
167
+ ### 引入
168
+
169
+ > @ray-js/ray^1.5.0 以上版本可使用
170
+
171
+ ```js
172
+ import { updateBluetoothKey } from '@ray-js/ray'
173
+ ```
174
+
175
+ ### 参数
176
+
177
+ **UpdateBluetoothKeyParams**
178
+
179
+ | 属性 | 类型 | 必填 | 说明 |
180
+ | --------------- | ---------------- | ---- | ---------------------- |
181
+ | devId | `string` | 是 | 设备 ID |
182
+ | unlockBindingId | `string` | 是 | 临时蓝牙开锁对应的序号 |
183
+ | offlineUnlock | `boolean` | 是 | 是否支持离线解锁 |
184
+ | timeSetType | `number` | 是 | 时效类型 |
185
+ | effectiveTime | `number` | 是 | 生效时间 |
186
+ | invalidTime | `number` | 是 | 失效时间 |
187
+ | availTime | `number` | 否 | 可用次数 |
188
+ | name | `string` | 否 | 名称 |
189
+ | phase | `number` | 否 | 状态 |
190
+ | schedule | `UpdateSchedule` | 否 | 周期设置 |
191
+
192
+ ### 返回
193
+
194
+ **UpdateBluetoothKeyResult**
195
+
196
+ `boolean`,表示修改是否成功。
197
+
198
+ ### 函数定义示例
199
+
200
+ ```typescript
201
+ /**
202
+ * 修改蓝牙钥匙信息
203
+ */
204
+ export function updateBluetoothKey(
205
+ params: UpdateBluetoothKeyParams
206
+ ): Promise<UpdateBluetoothKeyResult>
207
+ ```
208
+
209
+ ## freezeUnfreezeBluetoothKey
210
+
211
+ 冻结或解冻蓝牙钥匙。
212
+
213
+ ### 引入
214
+
215
+ > @ray-js/ray^1.5.0 以上版本可使用
216
+
217
+ ```js
218
+ import { freezeUnfreezeBluetoothKey } from '@ray-js/ray'
219
+ ```
220
+
221
+ ### 参数
222
+
223
+ **FreezeUnfreezeBluetoothKeyParams**
224
+
225
+ | 属性 | 类型 | 必填 | 说明 |
226
+ | --------------- | -------- | ---- | ---------------------- |
227
+ | devId | `string` | 是 | 设备 ID |
228
+ | unlockBindingId | `string` | 是 | 临时蓝牙开锁对应的序号 |
229
+ | phase | `number` | 否 | 状态:2. 正常 4. 冻结 |
230
+
231
+ ### 返回
232
+
233
+ **FreezeUnfreezeBluetoothKeyResult**
234
+
235
+ `boolean`,表示冻结或解冻是否成功。
236
+
237
+ ### 函数定义示例
238
+
239
+ ```typescript
240
+ /**
241
+ * 冻结或解冻蓝牙钥匙
242
+ */
243
+ export function freezeUnfreezeBluetoothKey(
244
+ params: FreezeUnfreezeBluetoothKeyParams
245
+ ): Promise<FreezeUnfreezeBluetoothKeyResult>
246
+ ```
247
+
248
+ ## changeBluetoothKeyName
249
+
250
+ 修改蓝牙钥匙名称。
251
+
252
+ ### 引入
253
+
254
+ > @ray-js/ray^1.5.0 以上版本可使用
255
+
256
+ ```js
257
+ import { changeBluetoothKeyName } from '@ray-js/ray'
258
+ ```
259
+
260
+ ### 参数
261
+
262
+ **ChangeBluetoothKeyNameParams**
263
+
264
+ | 属性 | 类型 | 必填 | 说明 |
265
+ | --------------- | -------- | ---- | ---------------------- |
266
+ | devId | `string` | 是 | 设备 ID |
267
+ | unlockBindingId | `string` | 是 | 临时蓝牙开锁对应的序号 |
268
+ | name | `string` | 是 | 新名称 |
269
+
270
+ ### 返回
271
+
272
+ **ChangeBluetoothKeyNameResult**
273
+
274
+ `boolean`,表示修改名称是否成功。
275
+
276
+ ### 函数定义示例
277
+
278
+ ```typescript
279
+ /**
280
+ * 修改蓝牙钥匙名称
281
+ */
282
+ export function changeBluetoothKeyName(
283
+ params: ChangeBluetoothKeyNameParams
284
+ ): Promise<ChangeBluetoothKeyNameResult>
285
+ ```
286
+
287
+ ## removeBluetoothKeyAuthorization
288
+
289
+ 删除蓝牙钥匙授权。
290
+
291
+ ### 引入
292
+
293
+ > @ray-js/ray^1.5.0 以上版本可使用
294
+
295
+ ```js
296
+ import { removeBluetoothKeyAuthorization } from '@ray-js/ray'
297
+ ```
298
+
299
+ ### 参数
300
+
301
+ **RemoveBluetoothKeyParams**
302
+
303
+ | 属性 | 类型 | 必填 | 说明 |
304
+ | --------------- | -------- | ---- | ---------------------- |
305
+ | devId | `string` | 是 | 设备 ID |
306
+ | unlockBindingId | `string` | 是 | 临时蓝牙开锁对应的序号 |
307
+
308
+ ### 返回
309
+
310
+ **RemoveBluetoothKeyResult**
311
+
312
+ `boolean`,表示删除授权是否成功。
313
+
314
+ ### 函数定义示例
315
+
316
+ ```typescript
317
+ /**
318
+ * 删除蓝牙钥匙授权
319
+ */
320
+ export function removeBluetoothKeyAuthorization(
321
+ params: RemoveBluetoothKeyParams
322
+ ): Promise<RemoveBluetoothKeyResult>
323
+ ```
@@ -0,0 +1,137 @@
1
+ /**
2
+ * SetDevicePropertiesParams - 设置设备属性参数
3
+ */
4
+ type SetDevicePropertiesParams = {
5
+ devId: string;
6
+ propKvs: string;
7
+ };
8
+ /**
9
+ * SetDevicePropertiesResponse - 设置设备属性响应
10
+ */
11
+ type SetDevicePropertiesResponse = boolean;
12
+ /**
13
+ * 设置设备属性
14
+ * @param {SetDevicePropertiesParams} params - 设置设备属性参数
15
+ * @returns {Promise<SetDevicePropertiesResponse>} - 设置结果的 Promise
16
+ */
17
+ export declare const setDeviceProperties: (params: SetDevicePropertiesParams) => Promise<SetDevicePropertiesResponse>;
18
+ /**
19
+ * GetDevicePropertiesParams - 查看设置的设备属性参数
20
+ */
21
+ type GetDevicePropertiesParams = {
22
+ devId: string;
23
+ props: string;
24
+ };
25
+ /**
26
+ * GetDevicePropertiesResponse - 查看设置的设备属性响应
27
+ */
28
+ type GetDevicePropertiesResponse = Record<string, string>;
29
+ /**
30
+ * 查看设置的设备属性
31
+ * @param {GetDevicePropertiesParams} params - 查看设备属性参数
32
+ * @returns {Promise<GetDevicePropertiesResponse>} - 查看结果的 Promise
33
+ */
34
+ export declare const getDeviceProperties: (params: GetDevicePropertiesParams) => Promise<GetDevicePropertiesResponse>;
35
+ /**
36
+ * MemberListParams - 获取家庭成员基础信息列表参数
37
+ */
38
+ type MemberListParams = {
39
+ devId: string;
40
+ };
41
+ /**
42
+ * MemberListResponseItem - 家庭成员基础信息列表项
43
+ */
44
+ type MemberListResponseItem = {
45
+ avatarUrl: string;
46
+ lockUserId: number;
47
+ nickName: string;
48
+ userType: number;
49
+ userContact: string;
50
+ userId: string;
51
+ };
52
+ /**
53
+ * MemberListResponse - 获取家庭成员基础信息列表响应
54
+ */
55
+ type MemberListResponse = MemberListResponseItem[];
56
+ /**
57
+ * 获取家庭成员基础信息列表
58
+ * @param {MemberListParams} params - 获取成员列表参数
59
+ * @returns {Promise<MemberListResponse>} - 成员列表的 Promise
60
+ */
61
+ export declare const getMemberList: (params: MemberListParams) => Promise<MemberListResponse>;
62
+ /**
63
+ * UnlockSyncParams - 解锁方式同步参数
64
+ */
65
+ type UnlockSyncParams = {
66
+ devId: string;
67
+ dpIds: Array<string>;
68
+ };
69
+ /**
70
+ * UnlockSyncResponse - 解锁方式同步响应
71
+ */
72
+ type UnlockSyncResponse = {
73
+ ins: string;
74
+ distributed: number;
75
+ dpId: number;
76
+ };
77
+ /**
78
+ * 解锁方式同步
79
+ * @param {UnlockSyncParams} params - 解锁方式同步参数
80
+ * @returns {Promise<UnlockSyncResponse>} - 同步结果的 Promise
81
+ */
82
+ export declare const syncUnlockMode: (params: UnlockSyncParams) => Promise<UnlockSyncResponse>;
83
+ /**
84
+ * QueryDateFormatParams - 查询时间对应的格式参数
85
+ */
86
+ type QueryDateFormatParams = {
87
+ devId: string;
88
+ uiId: string;
89
+ };
90
+ /**
91
+ * QueryDateFormatResponse - 查询时间对应的格式响应
92
+ */
93
+ type QueryDateFormatResponse = string;
94
+ /**
95
+ * 查询时间对应的格式
96
+ * @param {QueryDateFormatParams} params - 查询时间对应的格式参数
97
+ * @returns {Promise<QueryDateFormatResponse>} - 查询结果的 Promise
98
+ */
99
+ export declare const queryDateFormat: (params: QueryDateFormatParams) => Promise<QueryDateFormatResponse>;
100
+ /**
101
+ * QueryActiveDateParams - 用户获取设备自身的激活时间参数
102
+ */
103
+ type QueryActiveDateParams = {
104
+ devId: string;
105
+ };
106
+ /**
107
+ * QueryActiveDateResponse - 用户获取设备自身的激活时间响应
108
+ */
109
+ type QueryActiveDateResponse = string;
110
+ /**
111
+ * 用户获取设备自身的激活时间(配网时间)
112
+ * @param {QueryActiveDateParams} params - 查询激活时间参数
113
+ * @returns {Promise<QueryActiveDateResponse>} - 查询结果的 Promise
114
+ */
115
+ export declare const queryDeviceActiveDate: (params: QueryActiveDateParams) => Promise<QueryActiveDateResponse>;
116
+ /**
117
+ * QueryTrackDetailsParams - 获取设备位置参数
118
+ */
119
+ type QueryTrackDetailsParams = {
120
+ devId: string;
121
+ startTime: number;
122
+ stopTime: number;
123
+ };
124
+ /**
125
+ * QueryTrackDetailsResponse - 获取设备位置响应
126
+ */
127
+ type QueryTrackDetailsResponse = {
128
+ lat: number;
129
+ lng: number;
130
+ };
131
+ /**
132
+ * 获取设备位置
133
+ * @param {QueryTrackDetailsParams} params - 获取设备位置参数
134
+ * @returns {Promise<QueryTrackDetailsResponse>} - 查询结果的 Promise
135
+ */
136
+ export declare const queryDeviceTrackDetails: (params: QueryTrackDetailsParams) => Promise<QueryTrackDetailsResponse>;
137
+ export {};
@@ -0,0 +1,187 @@
1
+ import { THING } from '../../constants';
2
+ import requestCloud from '../../requestCloud';
3
+
4
+ //#region 设置设备属性
5
+
6
+ /**
7
+ * SetDevicePropertiesParams - 设置设备属性参数
8
+ */
9
+
10
+ /**
11
+ * SetDevicePropertiesResponse - 设置设备属性响应
12
+ */
13
+
14
+ /**
15
+ * 设置设备属性
16
+ * @param {SetDevicePropertiesParams} params - 设置设备属性参数
17
+ * @returns {Promise<SetDevicePropertiesResponse>} - 设置结果的 Promise
18
+ */
19
+ export const setDeviceProperties = params => {
20
+ return requestCloud({
21
+ api: "".concat(THING, ".m.device.props.save"),
22
+ version: '1.0',
23
+ data: params
24
+ });
25
+ };
26
+
27
+ //#endregion
28
+
29
+ //#region 查看设置的设备属性
30
+
31
+ /**
32
+ * GetDevicePropertiesParams - 查看设置的设备属性参数
33
+ */
34
+
35
+ /**
36
+ * GetDevicePropertiesResponse - 查看设置的设备属性响应
37
+ */
38
+
39
+ // 返回参数,一个键值对,key为LOST_ALERTER_HELPER,值为对应状态字符串
40
+
41
+ /**
42
+ * 查看设置的设备属性
43
+ * @param {GetDevicePropertiesParams} params - 查看设备属性参数
44
+ * @returns {Promise<GetDevicePropertiesResponse>} - 查看结果的 Promise
45
+ */
46
+ export const getDeviceProperties = params => {
47
+ return requestCloud({
48
+ api: "".concat(THING, ".m.device.props.fetch"),
49
+ version: '1.0',
50
+ data: params
51
+ });
52
+ };
53
+
54
+ //#endregion
55
+
56
+ //#region 获取家庭成员基础信息列表
57
+
58
+ /**
59
+ * MemberListParams - 获取家庭成员基础信息列表参数
60
+ */
61
+
62
+ /**
63
+ * MemberListResponseItem - 家庭成员基础信息列表项
64
+ */
65
+
66
+ /**
67
+ * MemberListResponse - 获取家庭成员基础信息列表响应
68
+ */
69
+
70
+ /**
71
+ * 获取家庭成员基础信息列表
72
+ * @param {MemberListParams} params - 获取成员列表参数
73
+ * @returns {Promise<MemberListResponse>} - 成员列表的 Promise
74
+ */
75
+ export const getMemberList = params => {
76
+ return requestCloud({
77
+ api: "".concat(THING, ".m.device.member.list"),
78
+ version: '5.0',
79
+ data: params
80
+ });
81
+ };
82
+
83
+ //#endregion
84
+
85
+ //#region 解锁方式同步
86
+
87
+ /**
88
+ * UnlockSyncParams - 解锁方式同步参数
89
+ */
90
+
91
+ /**
92
+ * UnlockSyncResponse - 解锁方式同步响应
93
+ */
94
+
95
+ /**
96
+ * 解锁方式同步
97
+ * @param {UnlockSyncParams} params - 解锁方式同步参数
98
+ * @returns {Promise<UnlockSyncResponse>} - 同步结果的 Promise
99
+ */
100
+ export const syncUnlockMode = params => {
101
+ return requestCloud({
102
+ api: "".concat(THING, ".m.device.opmode.sync.rise"),
103
+ version: '2.0',
104
+ data: params
105
+ });
106
+ };
107
+
108
+ //#endregion
109
+
110
+ //#region 查询时间对应的格式
111
+
112
+ /**
113
+ * QueryDateFormatParams - 查询时间对应的格式参数
114
+ */
115
+
116
+ /**
117
+ * QueryDateFormatResponse - 查询时间对应的格式响应
118
+ */
119
+
120
+ // 日期格式化格式
121
+
122
+ /**
123
+ * 查询时间对应的格式
124
+ * @param {QueryDateFormatParams} params - 查询时间对应的格式参数
125
+ * @returns {Promise<QueryDateFormatResponse>} - 查询结果的 Promise
126
+ */
127
+ export const queryDateFormat = params => {
128
+ return requestCloud({
129
+ api: "".concat(THING, ".m.i18n.date.template.get"),
130
+ version: '1.0',
131
+ data: params
132
+ });
133
+ };
134
+
135
+ //#endregion
136
+
137
+ //#region 用户获取设备自身的激活时间(配网时间)
138
+
139
+ /**
140
+ * QueryActiveDateParams - 用户获取设备自身的激活时间参数
141
+ */
142
+
143
+ /**
144
+ * QueryActiveDateResponse - 用户获取设备自身的激活时间响应
145
+ */
146
+
147
+ // 64 dp password_offline_time 最新数据
148
+
149
+ /**
150
+ * 用户获取设备自身的激活时间(配网时间)
151
+ * @param {QueryActiveDateParams} params - 查询激活时间参数
152
+ * @returns {Promise<QueryActiveDateResponse>} - 查询结果的 Promise
153
+ */
154
+ export const queryDeviceActiveDate = params => {
155
+ return requestCloud({
156
+ api: "".concat(THING, ".m.device.active.date"),
157
+ version: '1.0',
158
+ data: params
159
+ });
160
+ };
161
+
162
+ //#endregion
163
+
164
+ //#region 获取设备位置
165
+
166
+ /**
167
+ * QueryTrackDetailsParams - 获取设备位置参数
168
+ */
169
+
170
+ /**
171
+ * QueryTrackDetailsResponse - 获取设备位置响应
172
+ */
173
+
174
+ /**
175
+ * 获取设备位置
176
+ * @param {QueryTrackDetailsParams} params - 获取设备位置参数
177
+ * @returns {Promise<QueryTrackDetailsResponse>} - 查询结果的 Promise
178
+ */
179
+ export const queryDeviceTrackDetails = params => {
180
+ return requestCloud({
181
+ api: "".concat(THING, ".m.device.track.details"),
182
+ version: '1.0',
183
+ data: params
184
+ });
185
+ };
186
+
187
+ //#endregion