@ray-js/api 1.4.8 → 1.4.10

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/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ Copyright © 2014-2022 Tuya.inc
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,16 +1,16 @@
1
1
  import { IGetDpsInfos, IUpdateDpName, IUpdateGroupDpName, IGetWeatherQuality, IGetWeathers, ISaveCustomizePosition, IGetCustomizePosition, IGetDpsInfosResponse, IGetGroupDpsInfosResponse, IGetWeatherQualityResponse, IGetCustomizePositionResponse, IGetWeathersResponse, IGetDevProperty, ISaveDevProperty } from './interface';
2
2
  /**
3
3
  * 获取设备所有 DP 信息
4
- * @param {string} gwId 设备Id
4
+ * @param {string} gwId 网关Id, 直连设备值同 devId,子设备则传网关的设备id
5
5
  * @param {string} devId 设备Id
6
6
  */
7
7
  declare const getDpsInfos: (params: IGetDpsInfos) => Promise<IGetDpsInfosResponse>;
8
8
  /**
9
9
  * 更新设备 DP 名称
10
- * @param {string} gwId 设备Id
11
10
  * @param {string} devId 设备Id
12
11
  * @param {string} dpId dpId
13
12
  * @param {string} name dp自定义名称
13
+ * @param {string} gwId 设备Id, 可不传
14
14
  */
15
15
  declare const updateDpName: (params: IUpdateDpName) => Promise<boolean>;
16
16
  /**
@@ -4,7 +4,7 @@ import { requestCloud } from '../';
4
4
  import { THING } from '../constants';
5
5
  /**
6
6
  * 获取设备所有 DP 信息
7
- * @param {string} gwId 设备Id
7
+ * @param {string} gwId 网关Id, 直连设备值同 devId,子设备则传网关的设备id
8
8
  * @param {string} devId 设备Id
9
9
  */
10
10
  const getDpsInfos = params => {
@@ -17,10 +17,10 @@ const getDpsInfos = params => {
17
17
 
18
18
  /**
19
19
  * 更新设备 DP 名称
20
- * @param {string} gwId 设备Id
21
20
  * @param {string} devId 设备Id
22
21
  * @param {string} dpId dpId
23
22
  * @param {string} name dp自定义名称
23
+ * @param {string} gwId 设备Id, 可不传
24
24
  */
25
25
  const updateDpName = params => {
26
26
  return requestCloud({
@@ -395,10 +395,10 @@ export interface IGetDpsInfosResponse {
395
395
  type: string;
396
396
  }
397
397
  export interface IUpdateDpName {
398
- gwId: string;
399
398
  devId: string;
400
399
  dpId: string;
401
400
  name: string;
401
+ gwId?: string;
402
402
  }
403
403
  export interface IGetGroupDpsInfosResponse {
404
404
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.4.8",
3
+ "version": "1.4.10",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,13 +29,13 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.4.8",
33
- "@ray-js/router": "1.4.8",
32
+ "@ray-js/framework": "1.4.10",
33
+ "@ray-js/router": "1.4.10",
34
34
  "@ray-js/wechat": "^0.0.33",
35
35
  "base64-browser": "^1.0.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@ray-js/cli": "1.4.8",
38
+ "@ray-js/cli": "1.4.10",
39
39
  "art-template": "^4.13.2",
40
40
  "fs-extra": "^10.1.0",
41
41
  "miniprogram-api-typings": "^3.12.0",
@@ -45,5 +45,5 @@
45
45
  "access": "public",
46
46
  "registry": "https://registry.npmjs.org"
47
47
  },
48
- "gitHead": "14cb935df10f020e714b44bb41d4899646db751c"
48
+ "gitHead": "c7e426e2105743b1146961d6eef4cd34bda8ab34"
49
49
  }