@ray-js/api 1.5.0-beta.11 → 1.5.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.
Files changed (136) 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/device.d.ts +25 -1
  27. package/lib/cloud/device.js +15 -1
  28. package/lib/cloud/doorlock/README.md +62 -0
  29. package/lib/cloud/doorlock/auth.d.ts +235 -0
  30. package/lib/cloud/doorlock/auth.js +223 -0
  31. package/lib/cloud/doorlock/auth.md +323 -0
  32. package/lib/cloud/doorlock/device.d.ts +137 -0
  33. package/lib/cloud/doorlock/device.js +187 -0
  34. package/lib/cloud/doorlock/device.md +265 -0
  35. package/lib/cloud/doorlock/index.d.ts +10 -0
  36. package/lib/cloud/doorlock/index.js +20 -0
  37. package/lib/cloud/doorlock/log.d.ts +113 -0
  38. package/lib/cloud/doorlock/log.js +53 -0
  39. package/lib/cloud/doorlock/log.md +153 -0
  40. package/lib/cloud/doorlock/member-opmode.d.ts +121 -0
  41. package/lib/cloud/doorlock/member-opmode.js +104 -0
  42. package/lib/cloud/doorlock/member-opmode.md +279 -0
  43. package/lib/cloud/doorlock/member.d.ts +110 -0
  44. package/lib/cloud/doorlock/member.js +72 -0
  45. package/lib/cloud/doorlock/member.md +276 -0
  46. package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
  47. package/lib/cloud/doorlock/offline-pwd.js +67 -0
  48. package/lib/cloud/doorlock/offline-pwd.md +155 -0
  49. package/lib/cloud/doorlock/old.d.ts +36 -0
  50. package/lib/cloud/doorlock/old.js +102 -0
  51. package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
  52. package/lib/cloud/doorlock/temp-pwd.js +193 -0
  53. package/lib/cloud/doorlock/temp-pwd.md +362 -0
  54. package/lib/cloud/doorlock/unlock-method.d.ts +62 -0
  55. package/lib/cloud/doorlock/unlock-method.js +85 -0
  56. package/lib/cloud/doorlock/unlock-method.md +121 -0
  57. package/lib/cloud/doorlock/unlock.d.ts +89 -0
  58. package/lib/cloud/doorlock/unlock.js +76 -0
  59. package/lib/cloud/doorlock/unlock.md +222 -0
  60. package/lib/cloud/index.d.ts +4 -0
  61. package/lib/cloud/index.js +10 -1
  62. package/lib/cloud/interface.d.ts +39 -2
  63. package/lib/cloud/linkage.d.ts +8 -5
  64. package/lib/cloud/linkage.js +30 -9
  65. package/lib/cloud/outdoor.d.ts +15 -0
  66. package/lib/cloud/outdoor.js +25 -0
  67. package/lib/cloud/recipe/README.md +36 -0
  68. package/lib/cloud/recipe/basket.d.ts +220 -0
  69. package/lib/cloud/recipe/basket.js +328 -0
  70. package/lib/cloud/recipe/basket.md +431 -0
  71. package/lib/cloud/recipe/category-list.d.ts +71 -0
  72. package/lib/cloud/recipe/category-list.js +65 -0
  73. package/lib/cloud/recipe/category-list.md +132 -0
  74. package/lib/cloud/recipe/custom.d.ts +177 -0
  75. package/lib/cloud/recipe/custom.js +171 -0
  76. package/lib/cloud/recipe/custom.md +265 -0
  77. package/lib/cloud/recipe/index.d.ts +8 -0
  78. package/lib/cloud/recipe/index.js +8 -0
  79. package/lib/cloud/recipe/menu.d.ts +170 -0
  80. package/lib/cloud/recipe/menu.js +76 -0
  81. package/lib/cloud/recipe/menu.md +276 -0
  82. package/lib/cloud/recipe/query.d.ts +87 -0
  83. package/lib/cloud/recipe/query.js +101 -0
  84. package/lib/cloud/recipe/query.md +112 -0
  85. package/lib/cloud/recipe/record.d.ts +54 -0
  86. package/lib/cloud/recipe/record.js +87 -0
  87. package/lib/cloud/recipe/record.md +115 -0
  88. package/lib/cloud/recipe/score.d.ts +69 -0
  89. package/lib/cloud/recipe/score.js +106 -0
  90. package/lib/cloud/recipe/score.md +112 -0
  91. package/lib/cloud/recipe/star.d.ts +131 -0
  92. package/lib/cloud/recipe/star.js +151 -0
  93. package/lib/cloud/recipe/star.md +196 -0
  94. package/lib/cloud/recipe/types.d.ts +7 -0
  95. package/lib/cloud/recipe/types.js +0 -0
  96. package/lib/cloud/remoteGroup.d.ts +10 -0
  97. package/lib/cloud/remoteGroup.js +31 -0
  98. package/lib/constants.js +1 -1
  99. package/lib/errorCode.d.ts +4 -0
  100. package/lib/errorCode.js +3 -0
  101. package/lib/getCdnUrl/index.d.ts +2 -2
  102. package/lib/getCdnUrl/index.js +1 -2
  103. package/lib/getCdnUrl/index.wechat.d.ts +2 -2
  104. package/lib/getCdnUrl/index.wechat.js +1 -2
  105. package/lib/index.d.ts +1 -0
  106. package/lib/index.js +1 -0
  107. package/lib/nativeRouters/common.d.ts +15 -0
  108. package/lib/nativeRouters/common.js +38 -0
  109. package/lib/nativeRouters/device.d.ts +59 -0
  110. package/lib/nativeRouters/device.js +69 -0
  111. package/lib/nativeRouters/gw.d.ts +23 -0
  112. package/lib/nativeRouters/gw.js +27 -0
  113. package/lib/nativeRouters/index.d.ts +6 -1
  114. package/lib/nativeRouters/index.js +6 -1
  115. package/lib/nativeRouters/ipc.d.ts +30 -0
  116. package/lib/nativeRouters/ipc.js +44 -0
  117. package/lib/nativeRouters/outdoors.d.ts +47 -0
  118. package/lib/nativeRouters/outdoors.js +41 -0
  119. package/lib/nativeRouters/remoteGroup.d.ts +22 -0
  120. package/lib/nativeRouters/remoteGroup.js +11 -0
  121. package/lib/nativeRouters/root.d.ts +41 -0
  122. package/lib/nativeRouters/root.js +53 -0
  123. package/lib/openGroupCreate/index.js +3 -3
  124. package/lib/panel/i18n/index.d.ts +7 -6
  125. package/lib/panel/i18n/index.js +26 -11
  126. package/lib/panel/normalizeNetwork.js +1 -1
  127. package/lib/utils.d.ts +5 -2
  128. package/lib/utils.js +46 -20
  129. package/lib/utils.wechat.d.ts +3 -0
  130. package/lib/utils.wechat.js +17 -1
  131. package/lib/viewAPI.d.ts +1 -0
  132. package/lib/viewAPI.js +4 -3
  133. package/package.json +9 -8
  134. package/@types/PlayNetKit.d.ts +0 -444
  135. package/lib/nativeRouters/scene.d.ts +0 -34
  136. package/lib/nativeRouters/scene.js +0 -60
@@ -0,0 +1,223 @@
1
+ import { THING } from '../../constants';
2
+ import requestCloud from '../../requestCloud';
3
+
4
+ //#region 获取授权记录列表
5
+
6
+ /**
7
+ * AuthListParams - 获取授权记录列表参数
8
+ */
9
+
10
+ /**
11
+ * ScheduleDetailsEntry - 授权记录详情条目
12
+ */
13
+
14
+ /**
15
+ * OpModeInfo - 操作模式信息
16
+ */
17
+
18
+ /**
19
+ * AuthListResultEntry - 获取授权记录列表结果条目
20
+ */
21
+
22
+ /**
23
+ * AuthListResult - 获取授权记录列表结果
24
+ */
25
+
26
+ /**
27
+ * getAuthList - 获取授权记录列表函数
28
+ * @param {AuthListParams} params - 获取授权记录列表参数
29
+ * @returns {Promise<AuthListResult>} - 获取授权记录列表结果的 Promise
30
+ */
31
+ export const getLockAuthList = params => {
32
+ return requestCloud({
33
+ api: "".concat(THING, ".m.device.lock.auth.list"),
34
+ version: '1.0',
35
+ data: params
36
+ });
37
+ };
38
+
39
+ //#endregion
40
+
41
+ //#region 获取已失效的授权记录列表
42
+
43
+ /**
44
+ * InvalidAuthListParams - 获取已失效的授权记录列表参数
45
+ */
46
+
47
+ /**
48
+ * InvalidAuthListResultEntry - 获取已失效的授权记录列表结果条目
49
+ */
50
+
51
+ /**
52
+ * InvalidAuthListResult - 获取已失效的授权记录列表结果
53
+ */
54
+
55
+ /**
56
+ * 获取已失效的授权记录列表
57
+ * @param {InvalidAuthListParams} params - 获取已失效的授权记录列表参数
58
+ * @returns {Promise<InvalidAuthListResult>} - 获取已失效的授权记录列表结果的 Promise
59
+ */
60
+ export const getInvalidAuthList = params => {
61
+ return requestCloud({
62
+ api: "".concat(THING, ".m.device.lock.auth.list.invalid"),
63
+ version: '1.0',
64
+ data: params
65
+ });
66
+ };
67
+
68
+ //#endregion
69
+
70
+ //#region 清空已失效的授权记录列表
71
+
72
+ /**
73
+ * ClearInvalidAuthListParams - 清空已失效的授权记录列表参数
74
+ */
75
+
76
+ /**
77
+ * ClearInvalidAuthListResult - 清空已失效的授权记录列表结果
78
+ */
79
+
80
+ /**
81
+ * 清空已失效的授权记录列表
82
+ * @param {ClearInvalidAuthListParams} params - 清空已失效的授权记录列表参数
83
+ * @returns {Promise<ClearInvalidAuthListResult>} - 清空已失效的授权记录列表结果的 Promise
84
+ */
85
+ export const clearInvalidAuthList = params => {
86
+ return requestCloud({
87
+ api: "".concat(THING, ".m.device.lock.auth.list.clear"),
88
+ version: '1.0',
89
+ data: params
90
+ });
91
+ };
92
+
93
+ //#endregion
94
+ //#region 添加蓝牙授权
95
+
96
+ /**
97
+ * Schedule - 日程设置
98
+ */
99
+
100
+ /**
101
+ * AddBluetoothAuthParams - 添加蓝牙授权参数
102
+ */
103
+
104
+ /**
105
+ * AddBluetoothAuthResult - 添加蓝牙授权结果
106
+ */
107
+
108
+ /**
109
+ * 添加蓝牙授权
110
+ * @param {AddBluetoothAuthParams} params - 添加蓝牙授权参数
111
+ * @returns {Promise<AddBluetoothAuthResult>} - 添加蓝牙授权结果的 Promise
112
+ */
113
+ export const addBluetoothAuth = params => {
114
+ return requestCloud({
115
+ api: "".concat(THING, ".m.device.lock.key.virtual.add"),
116
+ version: '1.0',
117
+ data: params
118
+ });
119
+ };
120
+
121
+ //#endregion
122
+
123
+ //#region 修改蓝牙钥匙信息
124
+
125
+ /**
126
+ * UpdateSchedule - 更新日程设置
127
+ */
128
+
129
+ /**
130
+ * UpdateBluetoothKeyParams - 修改蓝牙钥匙信息参数
131
+ */
132
+
133
+ /**
134
+ * UpdateBluetoothKeyResult - 修改蓝牙钥匙信息结果
135
+ */
136
+
137
+ /**
138
+ * 修改蓝牙钥匙信息
139
+ * @param {UpdateBluetoothKeyParams} params - 修改蓝牙钥匙信息参数
140
+ * @returns {Promise<UpdateBluetoothKeyResult>} - 修改蓝牙钥匙信息结果的 Promise
141
+ */
142
+ export const updateBluetoothKey = params => {
143
+ return requestCloud({
144
+ api: "".concat(THING, ".m.device.lock.key.virtual.update"),
145
+ version: '1.0',
146
+ data: params
147
+ });
148
+ };
149
+ //#endregion
150
+ //#region 冻结/解冻蓝牙钥匙
151
+
152
+ /**
153
+ * FreezeUnfreezeBluetoothKeyParams - 冻结/解冻蓝牙钥匙参数
154
+ */
155
+
156
+ /**
157
+ * FreezeUnfreezeBluetoothKeyResult - 冻结/解冻蓝牙钥匙结果
158
+ */
159
+
160
+ /**
161
+ * 冻结或解冻蓝牙钥匙。
162
+ * @param {FreezeUnfreezeBluetoothKeyParams} params - 冻结或解冻蓝牙钥匙的参数。
163
+ * @returns {Promise<FreezeUnfreezeBluetoothKeyResult>} - 带有冻结或解冻蓝牙钥匙结果的 Promise。
164
+ */
165
+ export const freezeUnfreezeBluetoothKey = params => {
166
+ return requestCloud({
167
+ api: "".concat(THING, ".m.device.lock.key.virtual.phase"),
168
+ version: '1.0',
169
+ data: params
170
+ });
171
+ };
172
+
173
+ //#endregion
174
+
175
+ //#region 修改蓝牙钥匙名称
176
+
177
+ /**
178
+ * ChangeBluetoothKeyNameParams - 修改蓝牙钥匙名称参数
179
+ */
180
+
181
+ /**
182
+ * ChangeBluetoothKeyNameResult - 修改蓝牙钥匙名称结果
183
+ */
184
+
185
+ /**
186
+ * 修改蓝牙钥匙名称。
187
+ * @param {ChangeBluetoothKeyNameParams} params - 修改蓝牙钥匙名称的参数。
188
+ * @returns {Promise<ChangeBluetoothKeyNameResult>} - 带有修改蓝牙钥匙名称结果的 Promise。
189
+ */
190
+ export const changeBluetoothKeyName = params => {
191
+ return requestCloud({
192
+ api: "".concat(THING, ".m.device.lock.key.virtual.name"),
193
+ version: '1.0',
194
+ data: params
195
+ });
196
+ };
197
+
198
+ //#endregion
199
+
200
+ //#region 删除蓝牙钥匙授权
201
+
202
+ /**
203
+ * RemoveBluetoothKeyParams - 删除蓝牙钥匙授权参数
204
+ */
205
+
206
+ /**
207
+ * RemoveBluetoothKeyResult - 删除蓝牙钥匙授权结果
208
+ */
209
+
210
+ /**
211
+ * 删除蓝牙钥匙授权。
212
+ * @param {RemoveBluetoothKeyParams} params - 删除蓝牙钥匙授权的参数。
213
+ * @returns {Promise<RemoveBluetoothKeyResult>} - 带有删除蓝牙钥匙授权结果的 Promise。
214
+ */
215
+ export const removeBluetoothKeyAuthorization = params => {
216
+ return requestCloud({
217
+ api: "".concat(THING, ".m.device.lock.key.virtual.remove"),
218
+ version: '1.0',
219
+ data: params
220
+ });
221
+ };
222
+
223
+ //#endregion
@@ -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 {};