@ray-js/api 1.7.15-alpha.0 → 1.7.15-alpha.2
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,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
|
+
};
|
package/lib/cloud/index.d.ts
CHANGED
package/lib/cloud/index.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.7.15-alpha.
|
3
|
+
"version": "1.7.15-alpha.2",
|
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.
|
33
|
-
"@ray-js/router": "1.7.15-alpha.
|
32
|
+
"@ray-js/framework": "1.7.15-alpha.2",
|
33
|
+
"@ray-js/router": "1.7.15-alpha.2",
|
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.
|
39
|
+
"@ray-js/cli": "1.7.15-alpha.2",
|
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": "
|
49
|
+
"gitHead": "2e6389fce758322716767cb131a9cfb174c91f7a"
|
50
50
|
}
|