@ray-js/api 1.7.15-alpha.0 → 1.7.15-alpha.1

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.
@@ -0,0 +1 @@
1
+ export * from './tariffService';
@@ -0,0 +1,2 @@
1
+ // 设备电价相关
2
+ export * from './tariffService';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * 查询设备电价
3
+ * @param params
4
+ * @returns
5
+ */
6
+ export declare const getDeviceElectricityPrice: (params: {
7
+ devId: string;
8
+ queryParam: {
9
+ energyType: "electricity";
10
+ tariffTag: string;
11
+ };
12
+ }) => Promise<{
13
+ id: number;
14
+ entityId: string;
15
+ energyType: string;
16
+ tariffTag: string;
17
+ tariffName: string;
18
+ tariffType: string;
19
+ priceType: 0 | 2;
20
+ config: string;
21
+ }[]>;
22
+ /**
23
+ * 设置设备电价
24
+ * @param params
25
+ * @returns
26
+ */
27
+ export declare const setDeviceElectricityPrice: (params: {
28
+ devId: string;
29
+ tariffInfo: {
30
+ energyType: "electricity";
31
+ tariffTag: string;
32
+ priceType: 0 | 2;
33
+ config: Record<string, any>;
34
+ };
35
+ }) => Promise<boolean>;
@@ -0,0 +1,34 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import requestCloud from '../../requestCloud';
3
+
4
+ /**
5
+ * 查询设备电价
6
+ * @param params
7
+ * @returns
8
+ */
9
+ export const getDeviceElectricityPrice = params => {
10
+ return requestCloud({
11
+ api: `m.energy.device.tariff.info.get`,
12
+ version: '1.0',
13
+ data: params
14
+ });
15
+ };
16
+
17
+ /**
18
+ * 设置设备电价
19
+ * @param params
20
+ * @returns
21
+ */
22
+ export const setDeviceElectricityPrice = params => {
23
+ return requestCloud({
24
+ api: `m.energy.device.tariff.info.save`,
25
+ version: '1.0',
26
+ data: {
27
+ devId: params.devId,
28
+ tariffInfo: _objectSpread({
29
+ isEnable: 0,
30
+ tariffSource: 'manual'
31
+ }, params.tariffInfo)
32
+ }
33
+ });
34
+ };
@@ -10,6 +10,7 @@ export * from './remoteGroup';
10
10
  export * from './outdoor';
11
11
  export * from './doorlock';
12
12
  export * from './recipe';
13
+ export * from './electrician';
13
14
  export * from './laser-clean';
14
15
  export * from './gateway';
15
16
  export * from './energy';
@@ -15,6 +15,8 @@ export * from './outdoor';
15
15
  export * from './doorlock';
16
16
  // 菜谱
17
17
  export * from './recipe';
18
+ // 电工
19
+ export * from './electrician';
18
20
 
19
21
  // 激光清洁
20
22
  export * from './laser-clean';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.7.15-alpha.0",
3
+ "version": "1.7.15-alpha.1",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.7.15-alpha.0",
33
- "@ray-js/router": "1.7.15-alpha.0",
32
+ "@ray-js/framework": "1.7.15-alpha.1",
33
+ "@ray-js/router": "1.7.15-alpha.1",
34
34
  "@ray-js/wechat": "^0.3.8",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.7.15-alpha.0",
39
+ "@ray-js/cli": "1.7.15-alpha.1",
40
40
  "art-template": "^4.13.4",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.3",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.com"
48
48
  },
49
- "gitHead": "523d1c33e98ffbd0a1689b71f48a0200a7bfa0f9"
49
+ "gitHead": "e75c34ea23a641639ce292cd5b9f3c086e4c66ab"
50
50
  }