@ray-js/api 1.4.61-beta.1 → 1.4.61
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.d.ts
CHANGED
package/lib/cloud/interface.d.ts
CHANGED
@@ -911,8 +911,10 @@ export interface IBindRuleResponse {
|
|
911
911
|
}
|
912
912
|
export interface IGetBindRuleList {
|
913
913
|
bizDomain: string;
|
914
|
-
|
914
|
+
devId: string;
|
915
|
+
sourceEntityId?: string;
|
915
916
|
entityType: number;
|
917
|
+
gid: string;
|
916
918
|
}
|
917
919
|
export type IGetBindRuleListResponse = Array<{
|
918
920
|
associativeEntityId: string;
|
@@ -922,7 +924,8 @@ export type IGetBindRuleListResponse = Array<{
|
|
922
924
|
}>;
|
923
925
|
export interface IRemoveRule {
|
924
926
|
bizDomain: string;
|
925
|
-
sourceEntityId
|
927
|
+
sourceEntityId?: string;
|
928
|
+
devId: string;
|
926
929
|
associativeEntityId: string;
|
927
930
|
associativeEntityValue: string;
|
928
931
|
}
|
package/lib/cloud/linkage.d.ts
CHANGED
@@ -6,17 +6,20 @@ import { IGetLinkageDeviceList, IBindRule, IGetBindRuleList, IRemoveRule, IGetLi
|
|
6
6
|
*/
|
7
7
|
declare const getLinkageDeviceList: (params: IGetLinkageDeviceList) => Promise<IGetLinkageDeviceListResponse>;
|
8
8
|
/**
|
9
|
-
*
|
9
|
+
* 查询家庭下一键执行场景列表
|
10
10
|
* @param {number} devId 设备id
|
11
|
+
* @param {number} gid 家庭Id
|
11
12
|
*/
|
12
|
-
declare const getSceneList: ({ devId }: {
|
13
|
+
declare const getSceneList: ({ devId, gid }: {
|
13
14
|
devId: string;
|
15
|
+
gid: string;
|
14
16
|
}) => Promise<IGetSceneListResponse>;
|
15
17
|
/**
|
16
|
-
*
|
18
|
+
* 查询家庭下已绑定的列表
|
17
19
|
* @param {string} bizDomain 业务范围
|
18
|
-
* @param {string}
|
20
|
+
* @param {string} devId 设备id
|
19
21
|
* @param {number} entityType 实体类型
|
22
|
+
* @param {string} gid 家庭Id
|
20
23
|
*/
|
21
24
|
declare const getBindRuleList: (params: IGetBindRuleList) => Promise<IGetBindRuleListResponse>;
|
22
25
|
/**
|
@@ -32,7 +35,7 @@ declare const bindRule: ({ devId, associativeEntityId, ruleId, entitySubIds, exp
|
|
32
35
|
/**
|
33
36
|
* 解除联动
|
34
37
|
* @param {string} bizDomain 业务范围
|
35
|
-
* @param {string}
|
38
|
+
* @param {string} devId 设备id
|
36
39
|
* @param {string} associativeEntityId 关联dp组合
|
37
40
|
* @param {string} associativeEntityValue 规则id
|
38
41
|
*/
|
package/lib/cloud/linkage.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
1
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
|
+
const _excluded = ["gid", "devId", "sourceEntityId"];
|
2
4
|
import { requestCloud } from '../';
|
3
5
|
import { THING } from '../constants';
|
4
6
|
/**
|
@@ -10,39 +12,58 @@ const getLinkageDeviceList = params => {
|
|
10
12
|
return requestCloud({
|
11
13
|
api: "".concat(THING, ".m.linkage.dev.list"),
|
12
14
|
version: '3.0',
|
13
|
-
data: _objectSpread({}, params)
|
15
|
+
data: _objectSpread({}, params),
|
16
|
+
extData: {
|
17
|
+
gid: params.gid
|
18
|
+
}
|
14
19
|
});
|
15
20
|
};
|
16
21
|
|
17
22
|
/**
|
18
|
-
*
|
23
|
+
* 查询家庭下一键执行场景列表
|
19
24
|
* @param {number} devId 设备id
|
25
|
+
* @param {number} gid 家庭Id
|
20
26
|
*/
|
21
27
|
const getSceneList = _ref => {
|
22
28
|
let {
|
23
|
-
devId
|
29
|
+
devId,
|
30
|
+
gid
|
24
31
|
} = _ref;
|
25
32
|
return requestCloud({
|
26
33
|
api: "".concat(THING, ".m.linkage.rule.brief.query"),
|
27
34
|
version: '1.0',
|
28
35
|
data: {
|
29
36
|
devId
|
37
|
+
},
|
38
|
+
extData: {
|
39
|
+
gid
|
30
40
|
}
|
31
41
|
});
|
32
42
|
};
|
33
43
|
|
34
44
|
/**
|
35
|
-
*
|
45
|
+
* 查询家庭下已绑定的列表
|
36
46
|
* @param {string} bizDomain 业务范围
|
37
|
-
* @param {string}
|
47
|
+
* @param {string} devId 设备id
|
38
48
|
* @param {number} entityType 实体类型
|
49
|
+
* @param {string} gid 家庭Id
|
39
50
|
*/
|
40
|
-
|
41
|
-
const
|
51
|
+
const getBindRuleList = async params => {
|
52
|
+
const {
|
53
|
+
gid,
|
54
|
+
devId,
|
55
|
+
sourceEntityId
|
56
|
+
} = params,
|
57
|
+
rest = _objectWithoutProperties(params, _excluded);
|
42
58
|
return requestCloud({
|
43
59
|
api: "".concat(THING, ".m.linkage.associative.entity.id.category.query"),
|
44
60
|
version: '1.0',
|
45
|
-
data: _objectSpread({},
|
61
|
+
data: _objectSpread(_objectSpread({}, rest), {}, {
|
62
|
+
sourceEntityId: sourceEntityId || devId
|
63
|
+
}),
|
64
|
+
extData: {
|
65
|
+
gid
|
66
|
+
}
|
46
67
|
});
|
47
68
|
};
|
48
69
|
|
@@ -96,7 +117,7 @@ const bindRule = _ref2 => {
|
|
96
117
|
/**
|
97
118
|
* 解除联动
|
98
119
|
* @param {string} bizDomain 业务范围
|
99
|
-
* @param {string}
|
120
|
+
* @param {string} devId 设备id
|
100
121
|
* @param {string} associativeEntityId 关联dp组合
|
101
122
|
* @param {string} associativeEntityValue 规则id
|
102
123
|
*/
|
@@ -20,6 +20,10 @@ export function nativeRouter(uri, params) {
|
|
20
20
|
resolve();
|
21
21
|
},
|
22
22
|
fail(err) {
|
23
|
+
if (+err.errorCode === 40016) {
|
24
|
+
// 该环境不可使用,请使用真机预览和线上包
|
25
|
+
err.errorMsg = 'Cannot use in this environment. Please use real device preview.';
|
26
|
+
}
|
23
27
|
fail === null || fail === void 0 || fail(err);
|
24
28
|
reject(err);
|
25
29
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.4.61
|
3
|
+
"version": "1.4.61",
|
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": "
|
33
|
-
"@ray-js/router": "
|
34
|
-
"@ray-js/wechat": "^0.2.
|
32
|
+
"@ray-js/framework": "1.4.61",
|
33
|
+
"@ray-js/router": "1.4.61",
|
34
|
+
"@ray-js/wechat": "^0.2.8",
|
35
35
|
"base64-browser": "^1.0.1",
|
36
36
|
"query-string": "^7.1.3"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@ray-js/cli": "
|
39
|
+
"@ray-js/cli": "1.4.61",
|
40
40
|
"art-template": "^4.13.2",
|
41
41
|
"fs-extra": "^10.1.0",
|
42
42
|
"miniprogram-api-typings": "^3.12.2",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"access": "public",
|
47
47
|
"registry": "https://registry.npmjs.org"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "c57d133fbcabd0af8456f62fdb210b79ebc24d94"
|
50
50
|
}
|