@ray-js/api 1.6.4 → 1.6.5

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.
@@ -1,9 +1,10 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
2
  import { THING } from '../../constants';
2
3
  import requestCloud from '../../requestCloud';
3
4
 
4
5
  // 3.1. 获取当前登陆用户信息
5
6
 
6
- export const getCurrentMemberInfo = params => {
7
+ const getCurrentMemberInfo = params => {
7
8
  return requestCloud({
8
9
  api: "".concat(THING, ".m.device.member.get"),
9
10
  version: '3.0',
@@ -13,7 +14,7 @@ export const getCurrentMemberInfo = params => {
13
14
 
14
15
  // 3.2. 获取家庭成员列表(带解锁方式个数)
15
16
 
16
- export const getFamilyMemberListWithUnlockCount = params => {
17
+ const getFamilyMemberListWithUnlockCount = params => {
17
18
  return requestCloud({
18
19
  api: "".concat(THING, ".m.device.member.detail.list"),
19
20
  version: '2.0',
@@ -23,7 +24,7 @@ export const getFamilyMemberListWithUnlockCount = params => {
23
24
 
24
25
  // 3.3. 家庭成员移除成功通知
25
26
 
26
- export const removeFamilyMember = params => {
27
+ const removeFamilyMember = params => {
27
28
  return requestCloud({
28
29
  api: "".concat(THING, ".m.device.member.remove"),
29
30
  version: '2.0',
@@ -31,42 +32,236 @@ export const removeFamilyMember = params => {
31
32
  });
32
33
  };
33
34
 
34
- // 3.4. 查询是否有家庭里已删除但是门锁端未删除且有设置硬件解锁方式的成员
35
+ // 3.5. 门锁批量同步
35
36
 
36
- export const queryUserDeletion = params => {
37
+ const syncLockBatch = params => {
37
38
  return requestCloud({
38
- api: "".concat(THING, ".m.device.member.removed"),
39
+ api: "".concat(THING, ".m.device.lock.sync.batch"),
39
40
  version: '1.0',
40
41
  data: params
41
42
  });
42
43
  };
43
44
 
44
- // 3.5. 门锁批量同步
45
+ // 3.6. 更新用户时效
45
46
 
46
- export const syncLockBatch = params => {
47
+ const updateUserTimeSchedule = params => {
47
48
  return requestCloud({
48
- api: "".concat(THING, ".m.device.lock.sync.batch"),
49
+ api: "".concat(THING, ".m.device.user.time.schedule.update"),
49
50
  version: '1.0',
50
51
  data: params
51
52
  });
52
53
  };
53
54
 
54
- // 3.6. 更新用户时效
55
+ //#region 开门记录分配到成员
56
+
57
+ /**
58
+ * BindRecordUnlockIdParams - 开门记录分配到成员
59
+ */
55
60
 
56
- export const updateUserTimeSchedule = params => {
61
+ /**
62
+ * BindRecordUnlockIdResponse - 开门记录分配到成员
63
+ */
64
+
65
+ /**
66
+ * 开门记录分配到成员
67
+ * @param {BindRecordUnlockIdParams} params - 开门记录分配到成员参数
68
+ * @returns {Promise<BindRecordUnlockIdResponse>} - 查询结果的 Promise
69
+ */
70
+ const bindRecordUnlockId = params => {
57
71
  return requestCloud({
58
- api: "".concat(THING, ".m.device.user.time.schedule.update"),
72
+ api: "".concat(THING, ".m.device.user.unlock.bind"),
59
73
  version: '1.0',
60
- data: params
74
+ data: _objectSpread({}, params)
61
75
  });
62
76
  };
63
77
 
64
- // 3.7. 打开/关闭离线解锁开关
78
+ //#endregion
79
+
80
+ //#region 小程序分享
81
+
82
+ /**
83
+ * GetAppShareInfoParams - 小程序分享参数
84
+ */
65
85
 
66
- export const openCloseOfflineUnlock = params => {
86
+ /**
87
+ * GetAppShareInfoResponse - 小程序分享响应
88
+ */
89
+
90
+ /**
91
+ * 小程序分享
92
+ * @param {GetAppShareInfoParams} params - 小程序分享参数
93
+ * @returns {Promise<GetAppShareInfoResponse>} - 设置结果的 Promise
94
+ */
95
+ const getAppShareInfo = params => {
67
96
  return requestCloud({
68
- api: "".concat(THING, ".m.device.user.unlock.offline"),
97
+ api: "".concat(THING, ".m.smart.appShare.get"),
69
98
  version: '1.0',
70
99
  data: params
71
100
  });
72
- };
101
+ };
102
+
103
+ //#endregion
104
+
105
+ //#region 解除解锁方式与人的绑定关系
106
+
107
+ /**
108
+ * UnbindUnlockToUserParams - 解除解锁方式与人的绑定关系
109
+ */
110
+
111
+ /**
112
+ * GetHighPowerListResponse - 解除解锁方式与人的绑定关系
113
+ */
114
+
115
+ /**
116
+ * 解除解锁方式与人的绑定关系
117
+ * @param {UnbindUnlockToUserParams} params - 解除解锁方式与人的绑定关系参数
118
+ * @returns {Promise<UnbindUnlockToUserResponse>} - 查询结果的 Promise
119
+ */
120
+ const unbindUnlockToUser = params => {
121
+ return requestCloud({
122
+ api: "".concat(THING, ".m.device.user.unlock.unbind"),
123
+ version: '1.0',
124
+ data: _objectSpread({}, params)
125
+ });
126
+ };
127
+
128
+ //#endregion
129
+
130
+ //#region 获取所有的成员列表(新)
131
+
132
+ /**
133
+ * GetAllFamilyMemberParams - 获取所有的成员列表(新)
134
+ */
135
+
136
+ /**
137
+ * TimeScheduleInfo - 时间计划信息
138
+ */
139
+
140
+ /**
141
+ * UnlockDetail - 解锁详情
142
+ */
143
+
144
+ /**
145
+ * User - 用户信息
146
+ */
147
+
148
+ /**
149
+ * GetHighPowerListResponse - 获取所有的成员列表(新)
150
+ */
151
+
152
+ /**
153
+ * 获取所有的成员列表(新)
154
+ * @param {GetAllFamilyMemberParams} params - 获取所有的成员列表(新)参数
155
+ * @returns {Promise<GetAllFamilyMemberResponse>} - 查询结果的 Promise
156
+ */
157
+ const getAllFamilyMember = params => {
158
+ return requestCloud({
159
+ api: "m.lock.member.family.panel.all.list",
160
+ version: '1.0',
161
+ data: _objectSpread({}, params)
162
+ });
163
+ };
164
+
165
+ //#endregion
166
+
167
+ //#region 添加面板成员
168
+
169
+ /**
170
+ * AddNormalUserParams - 添加面板成员
171
+ */
172
+
173
+ /**
174
+ * GetHighPowerListResponse - 添加面板成员
175
+ */
176
+
177
+ /**
178
+ * 添加面板成员
179
+ * @param {AddNormalUserParams} params - 添加面板成员参数
180
+ * @returns {Promise<AddNormalUserResponse>} - 查询结果的 Promise
181
+ */
182
+ const addNormalUser = params => {
183
+ return requestCloud({
184
+ api: "m.smart.scale.history.user.add",
185
+ version: '1.0',
186
+ data: _objectSpread({}, params)
187
+ });
188
+ };
189
+
190
+ //#endregion
191
+
192
+ //#region 删除面板成员
193
+
194
+ /**
195
+ * RemoveNormalUserParams - 删除面板成员
196
+ */
197
+
198
+ /**
199
+ * GetHighPowerListResponse - 删除面板成员
200
+ */
201
+
202
+ /**
203
+ * 删除面板成员
204
+ * @param {RemoveNormalUserParams} params - 删除面板成员参数
205
+ * @returns {Promise<RemoveNormalUserResponse>} - 查询结果的 Promise
206
+ */
207
+ const removeNormalUser = params => {
208
+ return requestCloud({
209
+ api: "m.smart.scale.history.user.delete",
210
+ version: '2.0',
211
+ data: _objectSpread({}, params)
212
+ });
213
+ };
214
+
215
+ //#endregion
216
+
217
+ //#region 获取面板普通成员列表
218
+
219
+ /**
220
+ * GetNormalUserListParams - 获取面板普通成员列表
221
+ */
222
+
223
+ /**
224
+ * GetHighPowerListResponse - 获取面板普通成员列表
225
+ */
226
+
227
+ /**
228
+ * 获取面板普通成员列表
229
+ * @param {GetNormalUserListParams} params - 获取面板普通成员列表参数
230
+ * @returns {Promise<GetNormalUserListResponse>} - 查询结果的 Promise
231
+ */
232
+ const getNormalUserList = params => {
233
+ return requestCloud({
234
+ api: "".concat(THING, ".m.device.member.panel.detail.list"),
235
+ version: '1.0',
236
+ data: _objectSpread({}, params)
237
+ });
238
+ };
239
+
240
+ //#endregion
241
+
242
+ //#region 获取门锁成员信息
243
+
244
+ /**
245
+ * GetLockMemberInfoParams - 获取门锁成员信息
246
+ */
247
+
248
+ /**
249
+ * GetLockMemberInfoResponse - 获取门锁成员信息
250
+ */
251
+
252
+ /**
253
+ * 获取门锁成员信息
254
+ * @param {GetLockMemberInfoParams} params - 获取门锁成员信息参数
255
+ * @returns {Promise<GetLockMemberInfoResponse>} - 查询结果的 Promise
256
+ */
257
+ const getLockMemberInfo = params => {
258
+ return requestCloud({
259
+ api: "".concat(THING, ".m.device.member.panel.get"),
260
+ version: '1.0',
261
+ data: _objectSpread({}, params)
262
+ });
263
+ };
264
+
265
+ //#endregion
266
+
267
+ export { getCurrentMemberInfo, getFamilyMemberListWithUnlockCount, removeFamilyMember, syncLockBatch, updateUserTimeSchedule, bindRecordUnlockId, getAppShareInfo, unbindUnlockToUser, getNormalUserList, getAllFamilyMember, addNormalUser, removeNormalUser, getLockMemberInfo };
@@ -17,7 +17,7 @@ type OfflinePwdResult = {
17
17
  * @param {OfflinePwdParams} params - 请求参数
18
18
  * @returns {Promise<OfflinePwdResult>} - 响应结果的 Promise
19
19
  */
20
- export declare const getOfflinePassword: (params: OfflinePwdParams) => Promise<OfflinePwdResult>;
20
+ declare const getOfflinePassword: (params: OfflinePwdParams) => Promise<OfflinePwdResult>;
21
21
  type PwdRevokeParams = {
22
22
  devId: string;
23
23
  unlockBindingId: string;
@@ -29,7 +29,7 @@ type PwdRevokeResult = string;
29
29
  * @param {PwdRevokeParams} params - 请求参数
30
30
  * @returns {Promise<PwdRevokeResult>} - 响应结果的 Promise
31
31
  */
32
- export declare const revokeOfflinePassword: (params: PwdRevokeParams) => Promise<PwdRevokeResult>;
32
+ declare const revokeOfflinePassword: (params: PwdRevokeParams) => Promise<PwdRevokeResult>;
33
33
  type PwdNameUpdateParams = {
34
34
  devId: string;
35
35
  unlockBindingId: string;
@@ -41,7 +41,7 @@ type PwdNameUpdateResult = string;
41
41
  * @param {PwdNameUpdateParams} params - 请求参数
42
42
  * @returns {Promise<PwdNameUpdateResult>} - 响应结果的 Promise
43
43
  */
44
- export declare const updateOfflinePasswordName: (params: PwdNameUpdateParams) => Promise<PwdNameUpdateResult>;
44
+ declare const updateOfflinePasswordName: (params: PwdNameUpdateParams) => Promise<PwdNameUpdateResult>;
45
45
  type RevocablePwdParams = {
46
46
  devId: string;
47
47
  };
@@ -57,5 +57,5 @@ type RevocablePwdResult = RevocablePwdResultEntry[];
57
57
  * @param {RevocablePwdParams} params - 请求参数
58
58
  * @returns {Promise<RevocablePwdResult>} - 响应结果的 Promise
59
59
  */
60
- export declare const getRevocableOfflinePasswords: (params: RevocablePwdParams) => Promise<RevocablePwdResult>;
61
- export {};
60
+ declare const getRevocableOfflinePasswords: (params: RevocablePwdParams) => Promise<RevocablePwdResult>;
61
+ export { getOfflinePassword, revokeOfflinePassword, updateOfflinePasswordName, getRevocableOfflinePasswords, };
@@ -1,5 +1,6 @@
1
1
  import { THING } from '../../constants';
2
2
  import requestCloud from '../../requestCloud';
3
+
3
4
  // 6.1. 获取离线临时密码
4
5
 
5
6
  /**
@@ -7,7 +8,7 @@ import requestCloud from '../../requestCloud';
7
8
  * @param {OfflinePwdParams} params - 请求参数
8
9
  * @returns {Promise<OfflinePwdResult>} - 响应结果的 Promise
9
10
  */
10
- export const getOfflinePassword = params => {
11
+ const getOfflinePassword = params => {
11
12
  return requestCloud({
12
13
  api: "".concat(THING, ".m.device.lock.offlinepwd.get"),
13
14
  version: '3.0',
@@ -24,7 +25,7 @@ export const getOfflinePassword = params => {
24
25
  * @param {PwdRevokeParams} params - 请求参数
25
26
  * @returns {Promise<PwdRevokeResult>} - 响应结果的 Promise
26
27
  */
27
- export const revokeOfflinePassword = params => {
28
+ const revokeOfflinePassword = params => {
28
29
  return requestCloud({
29
30
  api: "".concat(THING, ".m.device.lock.offlinepwd.revoke"),
30
31
  version: '2.0',
@@ -41,7 +42,7 @@ export const revokeOfflinePassword = params => {
41
42
  * @param {PwdNameUpdateParams} params - 请求参数
42
43
  * @returns {Promise<PwdNameUpdateResult>} - 响应结果的 Promise
43
44
  */
44
- export const updateOfflinePasswordName = params => {
45
+ const updateOfflinePasswordName = params => {
45
46
  return requestCloud({
46
47
  api: "".concat(THING, ".m.device.lock.offlinepwd.name.update"),
47
48
  version: '2.0',
@@ -58,10 +59,11 @@ export const updateOfflinePasswordName = params => {
58
59
  * @param {RevocablePwdParams} params - 请求参数
59
60
  * @returns {Promise<RevocablePwdResult>} - 响应结果的 Promise
60
61
  */
61
- export const getRevocableOfflinePasswords = params => {
62
+ const getRevocableOfflinePasswords = params => {
62
63
  return requestCloud({
63
64
  api: "".concat(THING, ".m.device.lock.offlinepwd.revocable"),
64
65
  version: '1.0',
65
66
  data: params
66
67
  });
67
- };
68
+ };
69
+ export { getOfflinePassword, revokeOfflinePassword, updateOfflinePasswordName, getRevocableOfflinePasswords };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * QueryDoorLockRuleListParams - 查询门锁联动模版列表
3
+ */
4
+ type QueryDoorLockRuleListParams = {
5
+ devId: string;
6
+ };
7
+ /**
8
+ * QueryDoorLockRuleListResponse - 查询门锁联动模版列表
9
+ */
10
+ type QueryDoorLockRuleListResponse = Record<string, any>;
11
+ /**
12
+ * 查询门锁联动模版列表
13
+ * @param {QueryDoorLockRuleListParams} params - 查询门锁联动模版列表参数
14
+ * @returns {Promise<QueryDoorLockRuleListResponse>} - 查询结果的 Promise
15
+ */
16
+ declare const queryDoorLockRuleList: (params: QueryDoorLockRuleListParams) => Promise<QueryDoorLockRuleListResponse>;
17
+ /**
18
+ * GetMessageServiceCountResponse - 获取短信剩余次数
19
+ */
20
+ type GetMessageServiceCountResponse = {
21
+ packageStatus: string;
22
+ expireDate: number;
23
+ remainingTimes: number;
24
+ packageDesc: string;
25
+ };
26
+ /**
27
+ * 获取短信剩余次数
28
+ * @returns {Promise<GetMessageServiceCountResponse>} - 查询结果的 Promise
29
+ */
30
+ declare const getMessageServiceCount: () => Promise<GetMessageServiceCountResponse>;
31
+ /**
32
+ * GetPhoneServiceCountResponse - 获取电话剩余次数
33
+ */
34
+ type GetPhoneServiceCountResponse = {
35
+ packageStatus: string;
36
+ expireDate: number;
37
+ remainingTimes: number;
38
+ packageDesc: string;
39
+ };
40
+ /**
41
+ * 获取电话剩余次数
42
+ * @param {GetPhoneServiceCountParams} params - 获取电话剩余次数参数
43
+ * @returns {Promise<GetPhoneServiceCountResponse>} - 查询结果的 Promise
44
+ */
45
+ declare const getPhoneServiceCount: () => Promise<GetPhoneServiceCountResponse>;
46
+ export { queryDoorLockRuleList, getMessageServiceCount, getPhoneServiceCount };
@@ -0,0 +1,73 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import { THING } from '../../constants';
3
+ import requestCloud from '../../requestCloud';
4
+
5
+ //#region 查询门锁联动模版列表
6
+
7
+ /**
8
+ * QueryDoorLockRuleListParams - 查询门锁联动模版列表
9
+ */
10
+
11
+ /**
12
+ * QueryDoorLockRuleListResponse - 查询门锁联动模版列表
13
+ */
14
+
15
+ /**
16
+ * 查询门锁联动模版列表
17
+ * @param {QueryDoorLockRuleListParams} params - 查询门锁联动模版列表参数
18
+ * @returns {Promise<QueryDoorLockRuleListResponse>} - 查询结果的 Promise
19
+ */
20
+ const queryDoorLockRuleList = params => {
21
+ return requestCloud({
22
+ api: "".concat(THING, ".m.linkage.doorlock.rule.query"),
23
+ version: '2.0',
24
+ data: _objectSpread({}, params)
25
+ });
26
+ };
27
+
28
+ //#endregion
29
+
30
+ //#region 获取短信剩余次数
31
+
32
+ /**
33
+ * GetMessageServiceCountResponse - 获取短信剩余次数
34
+ */
35
+
36
+ /**
37
+ * 获取短信剩余次数
38
+ * @returns {Promise<GetMessageServiceCountResponse>} - 查询结果的 Promise
39
+ */
40
+ const getMessageServiceCount = () => {
41
+ return requestCloud({
42
+ api: "".concat(THING, ".m.notification.subscribe.info"),
43
+ version: '1.0',
44
+ data: {
45
+ notificationType: 'sms_notification'
46
+ }
47
+ });
48
+ };
49
+
50
+ //#endregion
51
+
52
+ //#region 获取电话剩余次数
53
+
54
+ /**
55
+ * GetPhoneServiceCountResponse - 获取电话剩余次数
56
+ */
57
+
58
+ /**
59
+ * 获取电话剩余次数
60
+ * @param {GetPhoneServiceCountParams} params - 获取电话剩余次数参数
61
+ * @returns {Promise<GetPhoneServiceCountResponse>} - 查询结果的 Promise
62
+ */
63
+ const getPhoneServiceCount = () => {
64
+ return requestCloud({
65
+ api: "".concat(THING, ".m.mobile.voice.times.count"),
66
+ version: '1.0',
67
+ data: {}
68
+ });
69
+ };
70
+
71
+ //#endregion
72
+
73
+ export { queryDoorLockRuleList, getMessageServiceCount, getPhoneServiceCount };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * GetCloudServiceStatusNewParams - 查询设备下当前生效的订单状态参数
3
+ */
4
+ type GetCloudServiceStatusNewParams = {
5
+ devId: string;
6
+ };
7
+ /**
8
+ * GetCloudServiceStatusNewResult - 查询设备下当前生效的订单状态结果
9
+ */
10
+ type GetCloudServiceStatusNewResult = Record<string, any>;
11
+ /**
12
+ * 查询设备下当前生效的订单状态
13
+ * @param {GetCloudServiceStatusNewParams} params - 查询设备下当前生效的订单状态的参数
14
+ * @returns {Promise<GetCloudServiceStatusNewResult>} - 带有查询设备下当前生效的订单状态结果的 Promise。
15
+ */
16
+ declare const getCloudServiceStatusNew: (params: GetCloudServiceStatusNewParams) => Promise<GetCloudServiceStatusNewResult>;
17
+ export { getCloudServiceStatusNew };
@@ -0,0 +1,27 @@
1
+ import requestCloud from '../../requestCloud';
2
+
3
+ //#region 查询设备下当前生效的订单状态
4
+
5
+ /**
6
+ * GetCloudServiceStatusNewParams - 查询设备下当前生效的订单状态参数
7
+ */
8
+
9
+ /**
10
+ * GetCloudServiceStatusNewResult - 查询设备下当前生效的订单状态结果
11
+ */
12
+
13
+ /**
14
+ * 查询设备下当前生效的订单状态
15
+ * @param {GetCloudServiceStatusNewParams} params - 查询设备下当前生效的订单状态的参数
16
+ * @returns {Promise<GetCloudServiceStatusNewResult>} - 带有查询设备下当前生效的订单状态结果的 Promise。
17
+ */
18
+ const getCloudServiceStatusNew = params => {
19
+ return requestCloud({
20
+ api: "m.lock.media.effect.credential",
21
+ version: '1.0',
22
+ data: params
23
+ });
24
+ };
25
+ //#endregion
26
+
27
+ export { getCloudServiceStatusNew };