@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.
- package/lib/cloud/doorlock/auth.d.ts +9 -9
- package/lib/cloud/doorlock/auth.js +13 -9
- package/lib/cloud/doorlock/device.d.ts +223 -45
- package/lib/cloud/doorlock/device.js +199 -43
- package/lib/cloud/doorlock/fittings.d.ts +92 -0
- package/lib/cloud/doorlock/fittings.js +103 -0
- package/lib/cloud/doorlock/index.d.ts +2 -1
- package/lib/cloud/doorlock/index.js +6 -2
- package/lib/cloud/doorlock/log.d.ts +117 -5
- package/lib/cloud/doorlock/log.js +99 -5
- package/lib/cloud/doorlock/member-opmode.d.ts +7 -18
- package/lib/cloud/doorlock/member-opmode.js +7 -21
- package/lib/cloud/doorlock/member.d.ts +224 -18
- package/lib/cloud/doorlock/member.js +212 -17
- package/lib/cloud/doorlock/offline-pwd.d.ts +5 -5
- package/lib/cloud/doorlock/offline-pwd.js +7 -5
- package/lib/cloud/doorlock/sence.d.ts +46 -0
- package/lib/cloud/doorlock/sence.js +73 -0
- package/lib/cloud/doorlock/service.d.ts +17 -0
- package/lib/cloud/doorlock/service.js +27 -0
- package/lib/cloud/doorlock/setting.d.ts +257 -0
- package/lib/cloud/doorlock/setting.js +283 -0
- package/lib/cloud/doorlock/temp-pwd.d.ts +17 -44
- package/lib/cloud/doorlock/temp-pwd.js +16 -37
- package/lib/cloud/doorlock/unlock-method.d.ts +4 -4
- package/lib/cloud/doorlock/unlock-method.js +6 -4
- package/lib/cloud/doorlock/unlock.d.ts +5 -40
- package/lib/cloud/doorlock/unlock.js +8 -34
- package/package.json +5 -5
- package/lib/cloud/doorlock/old.d.ts +0 -36
- package/lib/cloud/doorlock/old.js +0 -102
@@ -0,0 +1,257 @@
|
|
1
|
+
/**
|
2
|
+
* GetAudioSwitchParams - 查询音箱密码是否开启参数
|
3
|
+
*/
|
4
|
+
type GetAudioSwitchParams = {
|
5
|
+
devId: string;
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* GetAudioSwitchResult - 查询音箱密码是否开启结果
|
9
|
+
*/
|
10
|
+
type GetAudioSwitchResult = boolean;
|
11
|
+
/**
|
12
|
+
* 查询音箱密码是否开启
|
13
|
+
* @param {GetAudioSwitchParams} params - 查询音箱密码是否开启参数
|
14
|
+
* @returns {Promise<GetAudioSwitchResult>} - 查询音箱密码是否开启结果的 Promise
|
15
|
+
*/
|
16
|
+
declare const getAudioSwitch: (params: GetAudioSwitchParams) => Promise<GetAudioSwitchResult>;
|
17
|
+
/**
|
18
|
+
* SetAudioSwitchParams - 设置或取消音箱密码
|
19
|
+
*/
|
20
|
+
type SetAudioSwitchParams = {
|
21
|
+
devId: string;
|
22
|
+
open: boolean;
|
23
|
+
pwd: string;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* SetAudioSwitchResult - 设置或取消音箱密码
|
27
|
+
*/
|
28
|
+
type SetAudioSwitchResult = boolean;
|
29
|
+
/**
|
30
|
+
* 设置或取消音箱密码
|
31
|
+
* @param {SetAudioSwitchParams} params - 设置或取消音箱密码参数
|
32
|
+
* @returns {Promise<SetAudioSwitchResult>} - 设置或取消音箱密码结果的 Promise
|
33
|
+
*/
|
34
|
+
declare const setAudioSwitch: (params: SetAudioSwitchParams) => Promise<SetAudioSwitchResult>;
|
35
|
+
/**
|
36
|
+
* GetVoiceFileListParams - 获取语音文件列表
|
37
|
+
*/
|
38
|
+
type GetVoiceFileListParams = {
|
39
|
+
devId: string;
|
40
|
+
};
|
41
|
+
/**
|
42
|
+
* FileItem - 文件项类型
|
43
|
+
*/
|
44
|
+
type FileItem = {
|
45
|
+
fileType: number;
|
46
|
+
describe: string;
|
47
|
+
fileKey: string;
|
48
|
+
version: string;
|
49
|
+
fileStatus: number;
|
50
|
+
};
|
51
|
+
/**
|
52
|
+
* GetHighPowerListResponse - 获取语音文件列表
|
53
|
+
*/
|
54
|
+
type GetVoiceFileListResponse = FileItem[];
|
55
|
+
/**
|
56
|
+
* 获取语音文件列表
|
57
|
+
* @param {GetVoiceFileListParams} params - 获取语音文件列表参数
|
58
|
+
* @returns {Promise<GetVoiceFileListResponse>} - 查询结果的 Promise
|
59
|
+
*/
|
60
|
+
declare const getVoiceFileList: (params: GetVoiceFileListParams) => Promise<GetVoiceFileListResponse>;
|
61
|
+
/**
|
62
|
+
* GetDownloadUrlParams - 获取语音文件下载地址参数
|
63
|
+
*/
|
64
|
+
type GetDownloadUrlParams = {
|
65
|
+
devId: string;
|
66
|
+
fileKey: string;
|
67
|
+
};
|
68
|
+
/**
|
69
|
+
* GetDownloadUrlResponse - 获取语音文件下载地址响应
|
70
|
+
*/
|
71
|
+
type GetDownloadUrlResponse = string;
|
72
|
+
/**
|
73
|
+
* 获取语音文件下载地址
|
74
|
+
* @param {GetDownloadUrlParams} params - 获取语音文件下载地址参数
|
75
|
+
* @returns {Promise<GetDownloadUrlResponse>} - 设置结果的 Promise
|
76
|
+
*/
|
77
|
+
declare const getDownloadUrl: (params: GetDownloadUrlParams) => Promise<GetDownloadUrlResponse>;
|
78
|
+
/**
|
79
|
+
* GetBleGeofenceListParams - 获取当前用户在设备下的地理围栏场景信息参数
|
80
|
+
*/
|
81
|
+
type GetBleGeofenceListParams = {
|
82
|
+
devId: string;
|
83
|
+
};
|
84
|
+
/**
|
85
|
+
* RuleVO - 规则详细信息
|
86
|
+
*/
|
87
|
+
type RuleVO = {
|
88
|
+
id: number;
|
89
|
+
name: string;
|
90
|
+
devId: string;
|
91
|
+
ownerId: number;
|
92
|
+
uid: string;
|
93
|
+
status: boolean;
|
94
|
+
module: string;
|
95
|
+
geoTitle: string;
|
96
|
+
centerLng: string;
|
97
|
+
centerLat: string;
|
98
|
+
radius: string;
|
99
|
+
activeTime: number;
|
100
|
+
rssi?: string;
|
101
|
+
displayColor?: string;
|
102
|
+
icon?: string;
|
103
|
+
background?: string;
|
104
|
+
title?: string;
|
105
|
+
};
|
106
|
+
/**
|
107
|
+
* GetBleGeofenceListResponse - 获取当前用户在设备下的地理围栏场景信息响应
|
108
|
+
*/
|
109
|
+
type GetBleGeofenceListResponse = {
|
110
|
+
code: string;
|
111
|
+
title: string;
|
112
|
+
description: string;
|
113
|
+
displayColor: string;
|
114
|
+
icon: string;
|
115
|
+
background: string;
|
116
|
+
enable: boolean;
|
117
|
+
ruleVO: RuleVO;
|
118
|
+
};
|
119
|
+
/**
|
120
|
+
* 获取当前用户在设备下的地理围栏场景信息
|
121
|
+
* @param {GetBleGeofenceListParams} params - 获取当前用户在设备下的地理围栏场景信息参数
|
122
|
+
* @returns {Promise<GetBleGeofenceListResponse>} - 设置结果的 Promise
|
123
|
+
*/
|
124
|
+
declare const getBleGeofenceList: (params: GetBleGeofenceListParams) => Promise<GetBleGeofenceListResponse>;
|
125
|
+
/**
|
126
|
+
* RegisterBleCloudGeofenceParams - 注册地理围栏
|
127
|
+
*/
|
128
|
+
type RegisterBleCloudGeofenceParams = {
|
129
|
+
devId: string;
|
130
|
+
ownerId: number;
|
131
|
+
geoFenceInfo: GeoFenceInfo;
|
132
|
+
};
|
133
|
+
type GeoFenceInfo = {
|
134
|
+
module: string;
|
135
|
+
geoTitle?: string;
|
136
|
+
centerLng: string;
|
137
|
+
centerLat: string;
|
138
|
+
radius: string;
|
139
|
+
activeTime: number;
|
140
|
+
rssi?: string;
|
141
|
+
displayColor?: string;
|
142
|
+
icon?: string;
|
143
|
+
background?: string;
|
144
|
+
title?: string;
|
145
|
+
};
|
146
|
+
/**
|
147
|
+
* RegisterBleCloudGeofenceResponse - 注册地理围栏
|
148
|
+
*/
|
149
|
+
type RegisterBleCloudGeofenceResponse = {
|
150
|
+
id: number;
|
151
|
+
devId: string;
|
152
|
+
ownerId: number;
|
153
|
+
uid: string;
|
154
|
+
status: boolean;
|
155
|
+
module: string;
|
156
|
+
geoTitle?: string;
|
157
|
+
centerLng: string;
|
158
|
+
centerLat: string;
|
159
|
+
radius: string;
|
160
|
+
activeTime: number;
|
161
|
+
rssi?: string;
|
162
|
+
displayColor?: string;
|
163
|
+
icon?: string;
|
164
|
+
background?: string;
|
165
|
+
title?: string;
|
166
|
+
};
|
167
|
+
/**
|
168
|
+
* 注册地理围栏
|
169
|
+
* @param {RegisterBleCloudGeofenceParams} params - 注册地理围栏参数
|
170
|
+
* @returns {Promise<RegisterBleCloudGeofenceResponse>} - 查询结果的 Promise
|
171
|
+
*/
|
172
|
+
declare const registerBleCloudGeofence: (params: RegisterBleCloudGeofenceParams) => Promise<RegisterBleCloudGeofenceResponse>;
|
173
|
+
/**
|
174
|
+
* EditBleCloudGeofenceParams - 修改地理围栏
|
175
|
+
*/
|
176
|
+
type EditBleCloudGeofenceParams = {
|
177
|
+
id: number;
|
178
|
+
geoFenceInfo: GeoFenceInfo;
|
179
|
+
};
|
180
|
+
/**
|
181
|
+
* GetHighPowerListResponse - 修改地理围栏
|
182
|
+
*/
|
183
|
+
type EditBleCloudGeofenceResponse = boolean;
|
184
|
+
/**
|
185
|
+
* 修改地理围栏
|
186
|
+
* @param {EditBleCloudGeofenceParams} params - 修改地理围栏参数
|
187
|
+
* @returns {Promise<EditBleCloudGeofenceResponse>} - 查询结果的 Promise
|
188
|
+
*/
|
189
|
+
declare const editBleCloudGeofence: (params: EditBleCloudGeofenceParams) => Promise<EditBleCloudGeofenceResponse>;
|
190
|
+
/**
|
191
|
+
* HandleBleCloudGeofenceParams - 开启/关闭 地理围栏
|
192
|
+
*/
|
193
|
+
type HandleBleCloudGeofenceParams = {
|
194
|
+
id: number;
|
195
|
+
targetStatus: boolean;
|
196
|
+
};
|
197
|
+
/**
|
198
|
+
* HandleBleCloudGeofenceResponse - 开启/关闭 地理围栏
|
199
|
+
*/
|
200
|
+
type HandleBleCloudGeofenceResponse = boolean;
|
201
|
+
/**
|
202
|
+
* 开启/关闭 地理围栏
|
203
|
+
* @param {HandleBleCloudGeofenceParams} params - 开启/关闭 地理围栏参数
|
204
|
+
* @returns {Promise<HandleBleCloudGeofenceResponse>} - 查询结果的 Promise
|
205
|
+
*/
|
206
|
+
declare const handleBleCloudGeofence: (params: HandleBleCloudGeofenceParams) => Promise<HandleBleCloudGeofenceResponse>;
|
207
|
+
/**
|
208
|
+
* GetRemoteOpenKeyParams - 获取蓝牙开门密钥
|
209
|
+
*/
|
210
|
+
type GetRemoteOpenKeyParams = {
|
211
|
+
devId: string;
|
212
|
+
};
|
213
|
+
/**
|
214
|
+
* GetHighPowerListResponse - 获取蓝牙开门密钥
|
215
|
+
*/
|
216
|
+
type GetRemoteOpenKeyResponse = {
|
217
|
+
devUnlockId: string;
|
218
|
+
dpId: number;
|
219
|
+
wakeUpIns: string;
|
220
|
+
distributed: boolean;
|
221
|
+
ins: string;
|
222
|
+
};
|
223
|
+
/**
|
224
|
+
* 获取蓝牙开门密钥
|
225
|
+
* @param {GetRemoteOpenKeyParams} params - 获取蓝牙开门密钥参数
|
226
|
+
* @returns {Promise<GetRemoteOpenKeyResponse>} - 查询结果的 Promise
|
227
|
+
*/
|
228
|
+
declare const getRemoteOpenKey: (params: GetRemoteOpenKeyParams) => Promise<GetRemoteOpenKeyResponse>;
|
229
|
+
/**
|
230
|
+
* GetCountryListParams - 获取国家名称
|
231
|
+
*/
|
232
|
+
type GetCountryListParams = {
|
233
|
+
lang: string;
|
234
|
+
};
|
235
|
+
/**
|
236
|
+
* GetCountryListResponse - 获取国家名称
|
237
|
+
*/
|
238
|
+
type GetCountryListResponse = Record<string, any>;
|
239
|
+
/**
|
240
|
+
* 获取国家名称
|
241
|
+
* @param {GetCountryListParams} params - 获取国家名称参数
|
242
|
+
* @returns {Promise<GetCountryListResponse>} - 查询结果的 Promise
|
243
|
+
*/
|
244
|
+
declare const getCountryList: (params: GetCountryListParams) => Promise<GetCountryListResponse>;
|
245
|
+
/**
|
246
|
+
* GetUserRegionResult - 获取当前帐号所属地区结果
|
247
|
+
*/
|
248
|
+
type GetUserRegionResult = {
|
249
|
+
region: string;
|
250
|
+
};
|
251
|
+
/**
|
252
|
+
* 获取当前帐号所属地区
|
253
|
+
* @param {GetUserRegionParams} params - 获取当前帐号所属地区的参数
|
254
|
+
* @returns {Promise<GetUserRegionResult>} - 带有获取当前帐号所属地区结果的 Promise。
|
255
|
+
*/
|
256
|
+
declare const getUserRegion: () => Promise<GetUserRegionResult>;
|
257
|
+
export { getAudioSwitch, setAudioSwitch, getVoiceFileList, getDownloadUrl, getBleGeofenceList, registerBleCloudGeofence, editBleCloudGeofence, handleBleCloudGeofence, getRemoteOpenKey, getCountryList, getUserRegion, };
|
@@ -0,0 +1,283 @@
|
|
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
|
+
* GetAudioSwitchParams - 查询音箱密码是否开启参数
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* GetAudioSwitchResult - 查询音箱密码是否开启结果
|
13
|
+
*/
|
14
|
+
|
15
|
+
/**
|
16
|
+
* 查询音箱密码是否开启
|
17
|
+
* @param {GetAudioSwitchParams} params - 查询音箱密码是否开启参数
|
18
|
+
* @returns {Promise<GetAudioSwitchResult>} - 查询音箱密码是否开启结果的 Promise
|
19
|
+
*/
|
20
|
+
const getAudioSwitch = params => {
|
21
|
+
return requestCloud({
|
22
|
+
api: "".concat(THING, ".m.device.lock.voice.pwd.flag"),
|
23
|
+
version: '1.0',
|
24
|
+
data: params
|
25
|
+
});
|
26
|
+
};
|
27
|
+
|
28
|
+
//#endregion
|
29
|
+
|
30
|
+
//#region 设置或取消音箱密码
|
31
|
+
|
32
|
+
/**
|
33
|
+
* SetAudioSwitchParams - 设置或取消音箱密码
|
34
|
+
*/
|
35
|
+
|
36
|
+
/**
|
37
|
+
* SetAudioSwitchResult - 设置或取消音箱密码
|
38
|
+
*/
|
39
|
+
|
40
|
+
/**
|
41
|
+
* 设置或取消音箱密码
|
42
|
+
* @param {SetAudioSwitchParams} params - 设置或取消音箱密码参数
|
43
|
+
* @returns {Promise<SetAudioSwitchResult>} - 设置或取消音箱密码结果的 Promise
|
44
|
+
*/
|
45
|
+
const setAudioSwitch = params => {
|
46
|
+
return requestCloud({
|
47
|
+
api: "".concat(THING, ".m.device.lock.voice.pwd.setting"),
|
48
|
+
version: '1.0',
|
49
|
+
data: params
|
50
|
+
});
|
51
|
+
};
|
52
|
+
|
53
|
+
//#endregion
|
54
|
+
|
55
|
+
//#region 获取语音文件列表
|
56
|
+
|
57
|
+
/**
|
58
|
+
* GetVoiceFileListParams - 获取语音文件列表
|
59
|
+
*/
|
60
|
+
|
61
|
+
/**
|
62
|
+
* FileItem - 文件项类型
|
63
|
+
*/
|
64
|
+
|
65
|
+
/**
|
66
|
+
* GetHighPowerListResponse - 获取语音文件列表
|
67
|
+
*/
|
68
|
+
|
69
|
+
/**
|
70
|
+
* 获取语音文件列表
|
71
|
+
* @param {GetVoiceFileListParams} params - 获取语音文件列表参数
|
72
|
+
* @returns {Promise<GetVoiceFileListResponse>} - 查询结果的 Promise
|
73
|
+
*/
|
74
|
+
const getVoiceFileList = params => {
|
75
|
+
return requestCloud({
|
76
|
+
api: "".concat(THING, ".m.device.lock.voice.list"),
|
77
|
+
version: '1.0',
|
78
|
+
data: _objectSpread({}, params)
|
79
|
+
});
|
80
|
+
};
|
81
|
+
|
82
|
+
//#endregion
|
83
|
+
|
84
|
+
//#region 获取语音文件下载地址
|
85
|
+
|
86
|
+
/**
|
87
|
+
* GetDownloadUrlParams - 获取语音文件下载地址参数
|
88
|
+
*/
|
89
|
+
|
90
|
+
/**
|
91
|
+
* GetDownloadUrlResponse - 获取语音文件下载地址响应
|
92
|
+
*/
|
93
|
+
|
94
|
+
/**
|
95
|
+
* 获取语音文件下载地址
|
96
|
+
* @param {GetDownloadUrlParams} params - 获取语音文件下载地址参数
|
97
|
+
* @returns {Promise<GetDownloadUrlResponse>} - 设置结果的 Promise
|
98
|
+
*/
|
99
|
+
const getDownloadUrl = params => {
|
100
|
+
return requestCloud({
|
101
|
+
api: "".concat(THING, ".m.device.lock.voice.download"),
|
102
|
+
version: '1.0',
|
103
|
+
data: params
|
104
|
+
});
|
105
|
+
};
|
106
|
+
|
107
|
+
//#endregion
|
108
|
+
|
109
|
+
//#region 获取当前用户在设备下的地理围栏场景信息
|
110
|
+
|
111
|
+
/**
|
112
|
+
* GetBleGeofenceListParams - 获取当前用户在设备下的地理围栏场景信息参数
|
113
|
+
*/
|
114
|
+
|
115
|
+
/**
|
116
|
+
* RuleVO - 规则详细信息
|
117
|
+
*/
|
118
|
+
|
119
|
+
/**
|
120
|
+
* GetBleGeofenceListResponse - 获取当前用户在设备下的地理围栏场景信息响应
|
121
|
+
*/
|
122
|
+
|
123
|
+
/**
|
124
|
+
* 获取当前用户在设备下的地理围栏场景信息
|
125
|
+
* @param {GetBleGeofenceListParams} params - 获取当前用户在设备下的地理围栏场景信息参数
|
126
|
+
* @returns {Promise<GetBleGeofenceListResponse>} - 设置结果的 Promise
|
127
|
+
*/
|
128
|
+
const getBleGeofenceList = params => {
|
129
|
+
return requestCloud({
|
130
|
+
api: "".concat(THING, ".m.device.geofence.rule.shell.get"),
|
131
|
+
version: '1.0',
|
132
|
+
data: params
|
133
|
+
});
|
134
|
+
};
|
135
|
+
|
136
|
+
//#endregion
|
137
|
+
|
138
|
+
//#region 注册地理围栏
|
139
|
+
|
140
|
+
/**
|
141
|
+
* RegisterBleCloudGeofenceParams - 注册地理围栏
|
142
|
+
*/
|
143
|
+
|
144
|
+
/**
|
145
|
+
* RegisterBleCloudGeofenceResponse - 注册地理围栏
|
146
|
+
*/
|
147
|
+
|
148
|
+
/**
|
149
|
+
* 注册地理围栏
|
150
|
+
* @param {RegisterBleCloudGeofenceParams} params - 注册地理围栏参数
|
151
|
+
* @returns {Promise<RegisterBleCloudGeofenceResponse>} - 查询结果的 Promise
|
152
|
+
*/
|
153
|
+
const registerBleCloudGeofence = params => {
|
154
|
+
return requestCloud({
|
155
|
+
api: "".concat(THING, ".m.device.geofence.register"),
|
156
|
+
version: '1.0',
|
157
|
+
data: _objectSpread({}, params)
|
158
|
+
});
|
159
|
+
};
|
160
|
+
|
161
|
+
//#endregion
|
162
|
+
|
163
|
+
//#region 修改地理围栏
|
164
|
+
|
165
|
+
/**
|
166
|
+
* EditBleCloudGeofenceParams - 修改地理围栏
|
167
|
+
*/
|
168
|
+
|
169
|
+
/**
|
170
|
+
* GetHighPowerListResponse - 修改地理围栏
|
171
|
+
*/
|
172
|
+
|
173
|
+
/**
|
174
|
+
* 修改地理围栏
|
175
|
+
* @param {EditBleCloudGeofenceParams} params - 修改地理围栏参数
|
176
|
+
* @returns {Promise<EditBleCloudGeofenceResponse>} - 查询结果的 Promise
|
177
|
+
*/
|
178
|
+
const editBleCloudGeofence = params => {
|
179
|
+
return requestCloud({
|
180
|
+
api: "".concat(THING, ".m.device.geofence.modify"),
|
181
|
+
version: '1.0',
|
182
|
+
data: _objectSpread({}, params)
|
183
|
+
});
|
184
|
+
};
|
185
|
+
|
186
|
+
//#endregion
|
187
|
+
|
188
|
+
//#region 开启/关闭 地理围栏
|
189
|
+
|
190
|
+
/**
|
191
|
+
* HandleBleCloudGeofenceParams - 开启/关闭 地理围栏
|
192
|
+
*/
|
193
|
+
|
194
|
+
/**
|
195
|
+
* HandleBleCloudGeofenceResponse - 开启/关闭 地理围栏
|
196
|
+
*/
|
197
|
+
|
198
|
+
/**
|
199
|
+
* 开启/关闭 地理围栏
|
200
|
+
* @param {HandleBleCloudGeofenceParams} params - 开启/关闭 地理围栏参数
|
201
|
+
* @returns {Promise<HandleBleCloudGeofenceResponse>} - 查询结果的 Promise
|
202
|
+
*/
|
203
|
+
const handleBleCloudGeofence = params => {
|
204
|
+
return requestCloud({
|
205
|
+
api: "".concat(THING, ".m.device.geofence.status.switch"),
|
206
|
+
version: '1.0',
|
207
|
+
data: _objectSpread({}, params)
|
208
|
+
});
|
209
|
+
};
|
210
|
+
|
211
|
+
//#endregion
|
212
|
+
|
213
|
+
//#region 获取蓝牙开门密钥
|
214
|
+
|
215
|
+
/**
|
216
|
+
* GetRemoteOpenKeyParams - 获取蓝牙开门密钥
|
217
|
+
*/
|
218
|
+
|
219
|
+
/**
|
220
|
+
* GetHighPowerListResponse - 获取蓝牙开门密钥
|
221
|
+
*/
|
222
|
+
|
223
|
+
/**
|
224
|
+
* 获取蓝牙开门密钥
|
225
|
+
* @param {GetRemoteOpenKeyParams} params - 获取蓝牙开门密钥参数
|
226
|
+
* @returns {Promise<GetRemoteOpenKeyResponse>} - 查询结果的 Promise
|
227
|
+
*/
|
228
|
+
const getRemoteOpenKey = params => {
|
229
|
+
return requestCloud({
|
230
|
+
api: "".concat(THING, ".m.device.lock.remote.open.pwd.get"),
|
231
|
+
version: '1.0',
|
232
|
+
data: _objectSpread({}, params)
|
233
|
+
});
|
234
|
+
};
|
235
|
+
|
236
|
+
//#endregion
|
237
|
+
|
238
|
+
//#region 获取国家名称
|
239
|
+
|
240
|
+
/**
|
241
|
+
* GetCountryListParams - 获取国家名称
|
242
|
+
*/
|
243
|
+
|
244
|
+
/**
|
245
|
+
* GetCountryListResponse - 获取国家名称
|
246
|
+
*/
|
247
|
+
|
248
|
+
/**
|
249
|
+
* 获取国家名称
|
250
|
+
* @param {GetCountryListParams} params - 获取国家名称参数
|
251
|
+
* @returns {Promise<GetCountryListResponse>} - 查询结果的 Promise
|
252
|
+
*/
|
253
|
+
const getCountryList = params => {
|
254
|
+
return requestCloud({
|
255
|
+
api: "".concat(THING, ".m.country.list"),
|
256
|
+
version: '4.0',
|
257
|
+
data: _objectSpread({}, params)
|
258
|
+
});
|
259
|
+
};
|
260
|
+
|
261
|
+
//#endregion
|
262
|
+
|
263
|
+
//#region 获取当前帐号所属地区
|
264
|
+
|
265
|
+
/**
|
266
|
+
* GetUserRegionResult - 获取当前帐号所属地区结果
|
267
|
+
*/
|
268
|
+
|
269
|
+
/**
|
270
|
+
* 获取当前帐号所属地区
|
271
|
+
* @param {GetUserRegionParams} params - 获取当前帐号所属地区的参数
|
272
|
+
* @returns {Promise<GetUserRegionResult>} - 带有获取当前帐号所属地区结果的 Promise。
|
273
|
+
*/
|
274
|
+
const getUserRegion = () => {
|
275
|
+
return requestCloud({
|
276
|
+
api: "".concat(THING, ".m.user.region.get"),
|
277
|
+
version: '1.0',
|
278
|
+
data: {}
|
279
|
+
});
|
280
|
+
};
|
281
|
+
//#endregion
|
282
|
+
|
283
|
+
export { getAudioSwitch, setAudioSwitch, getVoiceFileList, getDownloadUrl, getBleGeofenceList, registerBleCloudGeofence, editBleCloudGeofence, handleBleCloudGeofence, getRemoteOpenKey, getCountryList, getUserRegion };
|
@@ -1,3 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* Schedule_Ver2 - 版本2的周期设置
|
3
|
+
*/
|
4
|
+
type Schedule_Ver2 = {
|
5
|
+
invalidTime?: number;
|
6
|
+
workingDay?: number;
|
7
|
+
allDay: boolean;
|
8
|
+
effectiveTime?: number;
|
9
|
+
};
|
1
10
|
type GetDynapwdParams = {
|
2
11
|
devId: string;
|
3
12
|
adminPwd: string;
|
@@ -10,7 +19,7 @@ type GetDynapwdResponse = {
|
|
10
19
|
* @param {GetDynapwdParams} params - 包含设备Id和管理员密码的参数对象
|
11
20
|
* @returns {Promise<GetDynapwdResponse>} - 包含动态密码数据的响应对象的 Promise
|
12
21
|
*/
|
13
|
-
|
22
|
+
declare const getDynamicPassword: (params: GetDynapwdParams) => Promise<GetDynapwdResponse>;
|
14
23
|
type ValidateTempPasswordParams = {
|
15
24
|
unlockBindingId?: number;
|
16
25
|
devId: string;
|
@@ -37,43 +46,7 @@ type ValidateTempPasswordResult = {
|
|
37
46
|
* @param {ValidateTempPasswordParams} params - 临时密码参数
|
38
47
|
* @returns {Promise<ValidateTempPasswordResult>} - 校验结果的 Promise
|
39
48
|
*/
|
40
|
-
|
41
|
-
/**
|
42
|
-
* Schedule_Ver2 - 版本2的周期设置
|
43
|
-
*/
|
44
|
-
type Schedule_Ver2 = {
|
45
|
-
invalidTime?: number;
|
46
|
-
workingDay?: number;
|
47
|
-
allDay: boolean;
|
48
|
-
effectiveTime?: number;
|
49
|
-
};
|
50
|
-
/**
|
51
|
-
* ValidateUpdateTempPasswordParams - 校验临时密码参数
|
52
|
-
*/
|
53
|
-
type ValidateUpdateTempPasswordParams = {
|
54
|
-
unlockBindingId?: number;
|
55
|
-
devId: string;
|
56
|
-
effectiveTime: number;
|
57
|
-
invalidTime: number;
|
58
|
-
name?: string;
|
59
|
-
schedule?: string;
|
60
|
-
countryCode?: string;
|
61
|
-
phone?: string;
|
62
|
-
};
|
63
|
-
/**
|
64
|
-
* ValidateUpdateTempPasswordResult - 校验临时密码结果
|
65
|
-
*/
|
66
|
-
type ValidateUpdateTempPasswordResult = {
|
67
|
-
valid?: boolean;
|
68
|
-
errorCode?: string;
|
69
|
-
errorMsg?: string;
|
70
|
-
};
|
71
|
-
/**
|
72
|
-
* 校验临时密码是否可以添加或更新
|
73
|
-
* @param {ValidateUpdateTempPasswordParams} params - 临时密码参数
|
74
|
-
* @returns {Promise<ValidateUpdateTempPasswordResult>} - 校验结果的 Promise
|
75
|
-
*/
|
76
|
-
export declare const validateAndUpdateTemporaryPassword: (params: ValidateUpdateTempPasswordParams) => Promise<ValidateUpdateTempPasswordResult>;
|
49
|
+
declare const validateTemporaryPassword: (params: ValidateTempPasswordParams) => Promise<ValidateTempPasswordResult>;
|
77
50
|
/**
|
78
51
|
* CreateTempPasswordParams - 创建临时密码参数
|
79
52
|
*/
|
@@ -99,7 +72,7 @@ type CreateTempPasswordResult = {
|
|
99
72
|
* @param {CreateTempPasswordParams} params - 创建临时密码参数
|
100
73
|
* @returns {Promise<CreateTempPasswordResult>} - 创建结果的 Promise
|
101
74
|
*/
|
102
|
-
|
75
|
+
declare const createTemporaryPassword: (params: CreateTempPasswordParams) => Promise<CreateTempPasswordResult>;
|
103
76
|
/**
|
104
77
|
* UpdateTempPasswordParams - 更新临时密码参数
|
105
78
|
*/
|
@@ -123,7 +96,7 @@ type UpdateTempPasswordResult = boolean;
|
|
123
96
|
* @param {UpdateTempPasswordParams} params - 更新临时密码参数
|
124
97
|
* @returns {Promise<UpdateTempPasswordResult>} - 更新结果的 Promise
|
125
98
|
*/
|
126
|
-
|
99
|
+
declare const updateTempPassword: (params: UpdateTempPasswordParams) => Promise<UpdateTempPasswordResult>;
|
127
100
|
/**
|
128
101
|
* UpdateTempPasswordNameParams - 更新临时密码名称参数
|
129
102
|
*/
|
@@ -141,7 +114,7 @@ type UpdateTempPasswordNameResult = boolean;
|
|
141
114
|
* @param {UpdateTempPasswordNameParams} params - 更新临时密码名称参数
|
142
115
|
* @returns {Promise<UpdateTempPasswordNameResult>} - 更新结果的 Promise
|
143
116
|
*/
|
144
|
-
|
117
|
+
declare const updateTempPasswordName: (params: UpdateTempPasswordNameParams) => Promise<UpdateTempPasswordNameResult>;
|
145
118
|
/**
|
146
119
|
* DeleteTempPasswordParams - 删除临时密码参数
|
147
120
|
*/
|
@@ -160,7 +133,7 @@ type DeleteTempPasswordResult = boolean;
|
|
160
133
|
* @param {DeleteTempPasswordParams} params - 删除临时密码参数
|
161
134
|
* @returns {Promise<DeleteTempPasswordResult>} - 删除结果的 Promise
|
162
135
|
*/
|
163
|
-
|
136
|
+
declare const deleteTemporaryPassword: (params: DeleteTempPasswordParams) => Promise<DeleteTempPasswordResult>;
|
164
137
|
/**
|
165
138
|
* ShareAvailabilityParams - 检查分享可用性参数
|
166
139
|
*/
|
@@ -190,5 +163,5 @@ type ShareAvailabilityResult = {
|
|
190
163
|
* @param {ShareAvailabilityParams} params - 检查分享可用性参数
|
191
164
|
* @returns {Promise<ShareAvailabilityResult>} - 检查结果的 Promise
|
192
165
|
*/
|
193
|
-
|
194
|
-
export {};
|
166
|
+
declare const checkShareAvailability: (params: ShareAvailabilityParams) => Promise<ShareAvailabilityResult>;
|
167
|
+
export { getDynamicPassword, validateTemporaryPassword, createTemporaryPassword, updateTempPassword, updateTempPasswordName, deleteTemporaryPassword, checkShareAvailability, };
|