@ray-js/api 1.7.83 → 1.7.84

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.
@@ -6,7 +6,6 @@ type OpenSceneCreateParams = {
6
6
  /**
7
7
  * 跳转创建场景页面
8
8
  * @param params - 创建场景参数
9
- * @param params.devId 设备 ID
10
9
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
11
10
  * @public
12
11
  * @since @ray-js/ray 1.4.32
@@ -28,7 +27,6 @@ export declare function openSceneCreate(params?: OpenSceneCreateParams): Promise
28
27
  /**
29
28
  * 跳转创建场景页面
30
29
  * @param params - 创建场景参数
31
- * @param params.devId 设备 ID
32
30
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
33
31
  * @public
34
32
  * @since @ray-js/ray 1.4.32
@@ -78,8 +76,6 @@ type OpenSceneEdit = {
78
76
  /**
79
77
  * 跳转编辑场景页面
80
78
  * @param params - 编辑场景参数
81
- * @param params.devId 设备 ID
82
- * @param params.sceneId 场景 ID
83
79
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
84
80
  * @public
85
81
  * @since @ray-js/ray 1.4.32
@@ -104,8 +100,6 @@ export declare function openSceneEdit(params?: OpenSceneEdit): Promise<void>;
104
100
  /**
105
101
  * 跳转编辑场景页面
106
102
  * @param params - 编辑场景参数
107
- * @param params.devId 设备 ID
108
- * @param params.sceneId 场景 ID
109
103
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
110
104
  * @public
111
105
  * @since @ray-js/ray 1.4.32
@@ -134,7 +128,6 @@ type OpenGuideScene = {
134
128
  /**
135
129
  * 跳转场景引导页面
136
130
  * @param params - 引导页参数
137
- * @param params.action 操作类型,'add' 为新增,'edit' 为编辑
138
131
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
139
132
  * @public
140
133
  * @since @ray-js/ray 1.4.32
@@ -154,32 +147,74 @@ type OpenGuideScene = {
154
147
  */
155
148
  export declare function openGuideScene(params?: OpenGuideScene): Promise<void>;
156
149
  type OpenConfigDevice = {
150
+ /** 设备 ID */
157
151
  devId?: string;
152
+ /** 场景 ID */
158
153
  sceneId?: string;
159
154
  } & ICommon;
160
155
  /**
161
- * 打开编辑场景页面
162
- * @param params { devId?: string, sceneId?: string, success?: () => void, fail?: (err?: { errorMsg: string, errorCode: string | number, innerError: { errorCode: string | number, errorMsg: string } }) => void, complete?: () => void, [key: string]: string | boolean | number }
163
- * @returns
156
+ * 跳转设备场景配置页面
157
+ * @param params - 设备场景配置参数
158
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
159
+ * @public
160
+ * @since @ray-js/ray 1.4.32
161
+ * @example
162
+ * ```typescript
163
+ * import { openConfigDevice } from '@ray-js/ray';
164
+ *
165
+ * await openConfigDevice({
166
+ * devId: 'device_001',
167
+ * sceneId: 'scene_001',
168
+ * });
169
+ * ```
164
170
  */
165
171
  export declare function openConfigDevice(params?: OpenConfigDevice): Promise<void>;
166
172
  type OpenDevNetworkCheck = {} & ICommon;
167
173
  /**
168
- * 检测设备网络
169
- * @param params { }
170
- * @returns
174
+ * 跳转设备网络检测页面
175
+ * @param params - 通用跳转参数
176
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
177
+ * @public
178
+ * @since @ray-js/ray 1.4.47
179
+ * @example
180
+ * ```typescript
181
+ * import { openDevNetworkCheck } from '@ray-js/ray';
182
+ *
183
+ * await openDevNetworkCheck();
184
+ * ```
171
185
  */
172
186
  export declare function openDevNetworkCheck(params?: OpenDevNetworkCheck): Promise<void>;
173
187
  type OpenSmartScene = {} & ICommon;
174
188
  /**
175
- * 跳转场景
189
+ * 跳转智能场景页面
190
+ * @param params - 通用跳转参数
191
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
192
+ * @public
193
+ * @since @ray-js/ray 1.4.47
194
+ * @example
195
+ * ```typescript
196
+ * import { openSmartScene } from '@ray-js/ray';
197
+ *
198
+ * await openSmartScene();
199
+ * ```
176
200
  */
177
201
  export declare function openSmartScene(params?: OpenSmartScene): Promise<void>;
178
202
  type OpenDevManualAndSmart = {
203
+ /** 设备 ID */
179
204
  devId?: string;
180
205
  } & ICommon;
181
206
  /**
182
- * 打开 “一键执行”和“自动化”
207
+ * 跳转设备的“一键执行”和“自动化”页面
208
+ * @param params - 跳转参数
209
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
210
+ * @public
211
+ * @since @ray-js/ray 1.4.47
212
+ * @example
213
+ * ```typescript
214
+ * import { openDevManualAndSmart } from '@ray-js/ray';
215
+ *
216
+ * await openDevManualAndSmart({ devId: 'device_001' });
217
+ * ```
183
218
  */
184
219
  export declare function openDevManualAndSmart(params?: OpenDevManualAndSmart): Promise<void>;
185
220
  type OpenDeviceOnlySearchConfigGwSub = {
@@ -3,7 +3,6 @@ import { nativeRouter } from './common';
3
3
  /**
4
4
  * 跳转创建场景页面
5
5
  * @param params - 创建场景参数
6
- * @param params.devId 设备 ID
7
6
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
8
7
  * @public
9
8
  * @since @ray-js/ray 1.4.32
@@ -28,7 +27,6 @@ export function openSceneCreate(params) {
28
27
  /**
29
28
  * 跳转创建场景页面
30
29
  * @param params - 创建场景参数
31
- * @param params.devId 设备 ID
32
30
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
33
31
  * @public
34
32
  * @since @ray-js/ray 1.4.32
@@ -84,8 +82,6 @@ export function openUniversalCreateScene(params) {
84
82
  /**
85
83
  * 跳转编辑场景页面
86
84
  * @param params - 编辑场景参数
87
- * @param params.devId 设备 ID
88
- * @param params.sceneId 场景 ID
89
85
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
90
86
  * @public
91
87
  * @since @ray-js/ray 1.4.32
@@ -113,8 +109,6 @@ export function openSceneEdit(params) {
113
109
  /**
114
110
  * 跳转编辑场景页面
115
111
  * @param params - 编辑场景参数
116
- * @param params.devId 设备 ID
117
- * @param params.sceneId 场景 ID
118
112
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
119
113
  * @public
120
114
  * @since @ray-js/ray 1.4.32
@@ -141,7 +135,6 @@ export function openEditScene(params) {
141
135
  /**
142
136
  * 跳转场景引导页面
143
137
  * @param params - 引导页参数
144
- * @param params.action 操作类型,'add' 为新增,'edit' 为编辑
145
138
  * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
146
139
  * @public
147
140
  * @since @ray-js/ray 1.4.32
@@ -163,9 +156,20 @@ export function openGuideScene(params) {
163
156
  return nativeRouter('thing_add_scene', params);
164
157
  }
165
158
  /**
166
- * 打开编辑场景页面
167
- * @param params { devId?: string, sceneId?: string, success?: () => void, fail?: (err?: { errorMsg: string, errorCode: string | number, innerError: { errorCode: string | number, errorMsg: string } }) => void, complete?: () => void, [key: string]: string | boolean | number }
168
- * @returns
159
+ * 跳转设备场景配置页面
160
+ * @param params - 设备场景配置参数
161
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
162
+ * @public
163
+ * @since @ray-js/ray 1.4.32
164
+ * @example
165
+ * ```typescript
166
+ * import { openConfigDevice } from '@ray-js/ray';
167
+ *
168
+ * await openConfigDevice({
169
+ * devId: 'device_001',
170
+ * sceneId: 'scene_001',
171
+ * });
172
+ * ```
169
173
  */
170
174
  export function openConfigDevice(params) {
171
175
  return nativeRouter('config_device', params);
@@ -174,9 +178,17 @@ export function openConfigDevice(params) {
174
178
  // dev_network_check
175
179
 
176
180
  /**
177
- * 检测设备网络
178
- * @param params { }
179
- * @returns
181
+ * 跳转设备网络检测页面
182
+ * @param params - 通用跳转参数
183
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
184
+ * @public
185
+ * @since @ray-js/ray 1.4.47
186
+ * @example
187
+ * ```typescript
188
+ * import { openDevNetworkCheck } from '@ray-js/ray';
189
+ *
190
+ * await openDevNetworkCheck();
191
+ * ```
180
192
  */
181
193
  export function openDevNetworkCheck(params) {
182
194
  return nativeRouter('dev_network_check', params);
@@ -185,7 +197,17 @@ export function openDevNetworkCheck(params) {
185
197
  // 跳转场景 smartScene
186
198
 
187
199
  /**
188
- * 跳转场景
200
+ * 跳转智能场景页面
201
+ * @param params - 通用跳转参数
202
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
203
+ * @public
204
+ * @since @ray-js/ray 1.4.47
205
+ * @example
206
+ * ```typescript
207
+ * import { openSmartScene } from '@ray-js/ray';
208
+ *
209
+ * await openSmartScene();
210
+ * ```
189
211
  */
190
212
  export function openSmartScene(params) {
191
213
  return nativeRouter('smartScene', params);
@@ -194,7 +216,17 @@ export function openSmartScene(params) {
194
216
  // 打开 “一键执行”和“自动化” devManualAndSmart
195
217
 
196
218
  /**
197
- * 打开 “一键执行”和“自动化”
219
+ * 跳转设备的“一键执行”和“自动化”页面
220
+ * @param params - 跳转参数
221
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
222
+ * @public
223
+ * @since @ray-js/ray 1.4.47
224
+ * @example
225
+ * ```typescript
226
+ * import { openDevManualAndSmart } from '@ray-js/ray';
227
+ *
228
+ * await openDevManualAndSmart({ devId: 'device_001' });
229
+ * ```
198
230
  */
199
231
  export function openDevManualAndSmart(params) {
200
232
  return nativeRouter('devManualAndSmart', params);
@@ -6,7 +6,6 @@ type GwIdParams = {
6
6
  /**
7
7
  * 打开 ZigBee 网关面板配网子设备(旧版)
8
8
  * @param params - 网关参数
9
- * @param params.gwId 网关 ID
10
9
  * @returns void
11
10
  * @public
12
11
  * @since @ray-js/ray 1.7.60
@@ -29,7 +28,6 @@ export declare function openPresentGatewayCategroy(params?: GwIdParams): Promise
29
28
  /**
30
29
  * 打开网关面板搜索配网页面,用于搜索并添加子设备
31
30
  * @param params - 网关参数
32
- * @param params.gwId 网关 ID
33
31
  * @returns void
34
32
  * @public
35
33
  * @since @ray-js/ray 1.7.60
@@ -51,7 +49,6 @@ export declare function openDeviceGWSubSearchConfigure(params?: GwIdParams): Pro
51
49
  /**
52
50
  * 打开网关面板配网子设备帮助列表页面
53
51
  * @param params - 网关参数
54
- * @param params.gwId 网关 ID
55
52
  * @returns void
56
53
  * @public
57
54
  * @since @ray-js/ray 1.7.60
@@ -2,7 +2,6 @@ import { nativeRouter } from './common';
2
2
  /**
3
3
  * 打开 ZigBee 网关面板配网子设备(旧版)
4
4
  * @param params - 网关参数
5
- * @param params.gwId 网关 ID
6
5
  * @returns void
7
6
  * @public
8
7
  * @since @ray-js/ray 1.7.60
@@ -28,7 +27,6 @@ export function openPresentGatewayCategroy(params) {
28
27
  /**
29
28
  * 打开网关面板搜索配网页面,用于搜索并添加子设备
30
29
  * @param params - 网关参数
31
- * @param params.gwId 网关 ID
32
30
  * @returns void
33
31
  * @public
34
32
  * @since @ray-js/ray 1.7.60
@@ -53,7 +51,6 @@ export function openDeviceGWSubSearchConfigure(params) {
53
51
  /**
54
52
  * 打开网关面板配网子设备帮助列表页面
55
53
  * @param params - 网关参数
56
- * @param params.gwId 网关 ID
57
54
  * @returns void
58
55
  * @public
59
56
  * @since @ray-js/ray 1.7.60
@@ -51,12 +51,21 @@ type OpenOutdoorShortcutSiriParams = {
51
51
  */
52
52
  export declare function openOutdoorShortcutSiri(params: OpenOutdoorShortcutSiriParams): Promise<void>;
53
53
  type OpenOutdoorConfigDeviceHomeParams = {
54
+ /** 产品 ID */
54
55
  productId?: string;
55
56
  } & ICommon;
56
57
  /**
57
- * 打开配网
58
- * @param params {productId: string}
59
- * @returns
58
+ * 跳转户外设备配网页面
59
+ * @param params - 配网参数
60
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
61
+ * @public
62
+ * @since @ray-js/ray 1.4.29
63
+ * @example
64
+ * ```typescript
65
+ * import { openOutdoorConfigDeviceHome } from '@ray-js/ray';
66
+ *
67
+ * await openOutdoorConfigDeviceHome({ productId: 'product_001' });
68
+ * ```
60
69
  */
61
70
  export declare function openOutdoorConfigDeviceHome(params: OpenOutdoorConfigDeviceHomeParams): Promise<void>;
62
71
  export {};
@@ -47,9 +47,17 @@ export function openOutdoorShortcutSiri(params) {
47
47
  return nativeRouter('tsod_shortcut_siri', params);
48
48
  }
49
49
  /**
50
- * 打开配网
51
- * @param params {productId: string}
52
- * @returns
50
+ * 跳转户外设备配网页面
51
+ * @param params - 配网参数
52
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
53
+ * @public
54
+ * @since @ray-js/ray 1.4.29
55
+ * @example
56
+ * ```typescript
57
+ * import { openOutdoorConfigDeviceHome } from '@ray-js/ray';
58
+ *
59
+ * await openOutdoorConfigDeviceHome({ productId: 'product_001' });
60
+ * ```
53
61
  */
54
62
  export function openOutdoorConfigDeviceHome(params) {
55
63
  return nativeRouter('config_device_home', params);
@@ -11,14 +11,31 @@ type OpenAppScanParams = {
11
11
  export declare function openAppScan(params?: OpenAppScanParams): Promise<void>;
12
12
  type OpenHelpAndFeedback = {} & ICommon;
13
13
  /**
14
- * 打开帮助与反馈
15
- * @param params { }
16
- * @returns
14
+ * 跳转帮助与反馈页面
15
+ * @param params - 通用跳转参数
16
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
17
+ * @public
18
+ * @since @ray-js/ray 1.4.47
19
+ * @example
20
+ * ```typescript
21
+ * import { openHelpAndFeedback } from '@ray-js/ray';
22
+ *
23
+ * await openHelpAndFeedback();
24
+ * ```
17
25
  */
18
26
  export declare function openHelpAndFeedback(params?: OpenHelpAndFeedback): Promise<void>;
19
27
  type OpenMoreService = {} & ICommon;
20
28
  /**
21
- * 跳转到更多服务
29
+ * 跳转更多服务页面
30
+ * @param params - 通用跳转参数
31
+ * @public
32
+ * @since @ray-js/ray 1.4.47
33
+ * @example
34
+ * ```typescript
35
+ * import { openMoreService } from '@ray-js/ray';
36
+ *
37
+ * await openMoreService();
38
+ * ```
22
39
  */
23
40
  export declare function openMoreService(params?: OpenMoreService): Promise<void>;
24
41
  type OpenAppHelpCenter = {
@@ -49,10 +66,21 @@ type OpenAppHelpCenter = {
49
66
  */
50
67
  export declare function openAppHelpCenter(params?: OpenAppHelpCenter): Promise<void>;
51
68
  type OpenMessageCenter = {
69
+ /** 消息分类:0 告警,1 家庭,2 通知 */
52
70
  category?: 0 | 1 | 2;
53
71
  } & ICommon;
54
72
  /**
55
- * 跳转到消息中心
73
+ * 跳转消息中心页面
74
+ * @param params - 消息中心参数
75
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
76
+ * @public
77
+ * @since @ray-js/ray 1.4.47
78
+ * @example
79
+ * ```typescript
80
+ * import { openMessageCenter } from '@ray-js/ray';
81
+ *
82
+ * await openMessageCenter({ category: 2 });
83
+ * ```
56
84
  */
57
85
  export declare function openMessageCenter(params?: OpenMessageCenter): Promise<void>;
58
86
  type OpenCompleteUserInfo = {} & ICommon;
@@ -11,9 +11,17 @@ export function openAppScan(params) {
11
11
  return nativeRouter('scan', params);
12
12
  }
13
13
  /**
14
- * 打开帮助与反馈
15
- * @param params { }
16
- * @returns
14
+ * 跳转帮助与反馈页面
15
+ * @param params - 通用跳转参数
16
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
17
+ * @public
18
+ * @since @ray-js/ray 1.4.47
19
+ * @example
20
+ * ```typescript
21
+ * import { openHelpAndFeedback } from '@ray-js/ray';
22
+ *
23
+ * await openHelpAndFeedback();
24
+ * ```
17
25
  */
18
26
  export function openHelpAndFeedback(params) {
19
27
  return nativeRouter('helpAndFeedBack', params);
@@ -22,7 +30,16 @@ export function openHelpAndFeedback(params) {
22
30
  // more_service
23
31
 
24
32
  /**
25
- * 跳转到更多服务
33
+ * 跳转更多服务页面
34
+ * @param params - 通用跳转参数
35
+ * @public
36
+ * @since @ray-js/ray 1.4.47
37
+ * @example
38
+ * ```typescript
39
+ * import { openMoreService } from '@ray-js/ray';
40
+ *
41
+ * await openMoreService();
42
+ * ```
26
43
  */
27
44
  export function openMoreService(params) {
28
45
  return nativeRouter('more_service', params);
@@ -67,7 +84,17 @@ export function openAppHelpCenter(params) {
67
84
  // messageCenter
68
85
 
69
86
  /**
70
- * 跳转到消息中心
87
+ * 跳转消息中心页面
88
+ * @param params - 消息中心参数
89
+ * @returns 跳转结果的 Promise,成功时 resolve,失败时 reject
90
+ * @public
91
+ * @since @ray-js/ray 1.4.47
92
+ * @example
93
+ * ```typescript
94
+ * import { openMessageCenter } from '@ray-js/ray';
95
+ *
96
+ * await openMessageCenter({ category: 2 });
97
+ * ```
71
98
  */
72
99
  export function openMessageCenter(params) {
73
100
  return nativeRouter('messageCenter', params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.7.83",
3
+ "version": "1.7.84",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,8 +29,8 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.7.83",
33
- "@ray-js/router": "1.7.83",
32
+ "@ray-js/framework": "1.7.84",
33
+ "@ray-js/router": "1.7.84",
34
34
  "base64-browser": "^1.0.1",
35
35
  "query-string": "^7.1.3"
36
36
  },
@@ -38,7 +38,7 @@
38
38
  "@ray-js/wechat": "^0.3.13"
39
39
  },
40
40
  "devDependencies": {
41
- "@ray-js/cli": "1.7.83",
41
+ "@ray-js/cli": "1.7.84",
42
42
  "art-template": "^4.13.4",
43
43
  "fs-extra": "^10.1.0",
44
44
  "miniprogram-api-typings": "^3.12.3",
@@ -48,5 +48,5 @@
48
48
  "access": "public",
49
49
  "registry": "https://registry.npmjs.org"
50
50
  },
51
- "gitHead": "f431d6e9c446b1f0668fcb11f04c5df98a3c0ac2"
51
+ "gitHead": "a4a58d3a6b2559b9d00c1b2d99e86c4764ee2332"
52
52
  }