@ray-js/api 1.5.0-beta.12 → 1.5.0
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/@types/BaseKit.d.ts +246 -126
- package/@types/BizKit.d.ts +1 -1
- package/@types/MapKit.d.ts +237 -1
- package/@types/MiniKit.d.ts +1 -1
- package/@types/OutdoorKit.d.ts +232 -0
- package/@types/P2PKit.d.ts +24 -2
- package/@types/all-kits.d.ts +1 -0
- package/@types/api-extend.d.ts +8 -2
- package/@types/index.d.ts +87 -0
- package/lib/{BaseKit-3.3.10.d.ts → BaseKit-3.11.0.d.ts} +1 -0
- package/lib/{BaseKit-3.3.10.js → BaseKit-3.11.0.js} +6 -2
- package/lib/BizKit-3.2.7.js +2 -1
- package/lib/DeviceKit-3.3.1.js +2 -1
- package/lib/HomeKit-3.1.4.js +2 -1
- package/lib/{MapKit-3.0.7.d.ts → MapKit-3.4.13.d.ts} +5 -0
- package/lib/{MapKit-3.0.7.js → MapKit-3.4.13.js} +19 -1
- package/lib/MiniKit-3.1.0.js +3 -2
- package/lib/OutdoorKit-1.0.4.d.ts +14 -0
- package/lib/OutdoorKit-1.0.4.js +39 -0
- package/lib/P2PKit-2.0.3.d.ts +1 -0
- package/lib/P2PKit-2.0.3.js +5 -1
- package/lib/PlayNetKit-1.1.3.d.ts +24 -25
- package/lib/PlayNetKit-1.1.3.js +2 -1
- package/lib/all-kits.d.ts +3 -2
- package/lib/all-kits.js +3 -2
- package/lib/cloud/alarm.js +2 -2
- package/lib/cloud/core.js +1 -1
- package/lib/cloud/device.d.ts +25 -1
- package/lib/cloud/device.js +20 -6
- package/lib/cloud/doorlock/README.md +62 -0
- package/lib/cloud/doorlock/auth.d.ts +235 -0
- package/lib/cloud/doorlock/auth.js +223 -0
- package/lib/cloud/doorlock/auth.md +323 -0
- package/lib/cloud/doorlock/device.d.ts +137 -0
- package/lib/cloud/doorlock/device.js +187 -0
- package/lib/cloud/doorlock/device.md +265 -0
- package/lib/cloud/doorlock/index.d.ts +10 -0
- package/lib/cloud/doorlock/index.js +20 -0
- package/lib/cloud/doorlock/log.d.ts +113 -0
- package/lib/cloud/doorlock/log.js +53 -0
- package/lib/cloud/doorlock/log.md +153 -0
- package/lib/cloud/doorlock/member-opmode.d.ts +121 -0
- package/lib/cloud/doorlock/member-opmode.js +104 -0
- package/lib/cloud/doorlock/member-opmode.md +279 -0
- package/lib/cloud/doorlock/member.d.ts +110 -0
- package/lib/cloud/doorlock/member.js +72 -0
- package/lib/cloud/doorlock/member.md +276 -0
- package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
- package/lib/cloud/doorlock/offline-pwd.js +67 -0
- package/lib/cloud/doorlock/offline-pwd.md +155 -0
- package/lib/cloud/doorlock/old.d.ts +36 -0
- package/lib/cloud/doorlock/old.js +102 -0
- package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
- package/lib/cloud/doorlock/temp-pwd.js +193 -0
- package/lib/cloud/doorlock/temp-pwd.md +362 -0
- package/lib/cloud/doorlock/unlock-method.d.ts +62 -0
- package/lib/cloud/doorlock/unlock-method.js +85 -0
- package/lib/cloud/doorlock/unlock-method.md +121 -0
- package/lib/cloud/doorlock/unlock.d.ts +89 -0
- package/lib/cloud/doorlock/unlock.js +76 -0
- package/lib/cloud/doorlock/unlock.md +222 -0
- package/lib/cloud/index.d.ts +4 -0
- package/lib/cloud/index.js +10 -1
- package/lib/cloud/interface.d.ts +39 -2
- package/lib/cloud/linkage.d.ts +8 -5
- package/lib/cloud/linkage.js +38 -17
- package/lib/cloud/outdoor.d.ts +15 -0
- package/lib/cloud/outdoor.js +25 -0
- package/lib/cloud/recipe/README.md +36 -0
- package/lib/cloud/recipe/basket.d.ts +220 -0
- package/lib/cloud/recipe/basket.js +328 -0
- package/lib/cloud/recipe/basket.md +431 -0
- package/lib/cloud/recipe/category-list.d.ts +71 -0
- package/lib/cloud/recipe/category-list.js +65 -0
- package/lib/cloud/recipe/category-list.md +132 -0
- package/lib/cloud/recipe/custom.d.ts +177 -0
- package/lib/cloud/recipe/custom.js +171 -0
- package/lib/cloud/recipe/custom.md +265 -0
- package/lib/cloud/recipe/index.d.ts +8 -0
- package/lib/cloud/recipe/index.js +8 -0
- package/lib/cloud/recipe/menu.d.ts +170 -0
- package/lib/cloud/recipe/menu.js +76 -0
- package/lib/cloud/recipe/menu.md +276 -0
- package/lib/cloud/recipe/query.d.ts +87 -0
- package/lib/cloud/recipe/query.js +101 -0
- package/lib/cloud/recipe/query.md +112 -0
- package/lib/cloud/recipe/record.d.ts +54 -0
- package/lib/cloud/recipe/record.js +87 -0
- package/lib/cloud/recipe/record.md +115 -0
- package/lib/cloud/recipe/score.d.ts +69 -0
- package/lib/cloud/recipe/score.js +106 -0
- package/lib/cloud/recipe/score.md +112 -0
- package/lib/cloud/recipe/star.d.ts +131 -0
- package/lib/cloud/recipe/star.js +151 -0
- package/lib/cloud/recipe/star.md +196 -0
- package/lib/cloud/recipe/types.d.ts +7 -0
- package/lib/cloud/recipe/types.js +0 -0
- package/lib/cloud/remoteGroup.d.ts +10 -0
- package/lib/cloud/remoteGroup.js +31 -0
- package/lib/cloud/statistic.js +9 -9
- package/lib/cloud/timer.js +14 -14
- package/lib/constants.js +1 -1
- package/lib/errorCode.d.ts +4 -0
- package/lib/errorCode.js +3 -0
- package/lib/getCdnUrl/index.d.ts +2 -2
- package/lib/getCdnUrl/index.js +1 -2
- package/lib/getCdnUrl/index.wechat.d.ts +2 -2
- package/lib/getCdnUrl/index.wechat.js +1 -2
- package/lib/getElementById/index.thing.js +1 -1
- package/lib/getElementById/index.wechat.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/nativeRouters/common.d.ts +15 -0
- package/lib/nativeRouters/common.js +38 -0
- package/lib/nativeRouters/device.d.ts +59 -0
- package/lib/nativeRouters/device.js +69 -0
- package/lib/nativeRouters/gw.d.ts +23 -0
- package/lib/nativeRouters/gw.js +27 -0
- package/lib/nativeRouters/index.d.ts +6 -1
- package/lib/nativeRouters/index.js +6 -1
- package/lib/nativeRouters/ipc.d.ts +30 -0
- package/lib/nativeRouters/ipc.js +44 -0
- package/lib/nativeRouters/outdoors.d.ts +47 -0
- package/lib/nativeRouters/outdoors.js +41 -0
- package/lib/nativeRouters/remoteGroup.d.ts +22 -0
- package/lib/nativeRouters/remoteGroup.js +11 -0
- package/lib/nativeRouters/root.d.ts +41 -0
- package/lib/nativeRouters/root.js +53 -0
- package/lib/openGroupCreate/index.js +3 -3
- package/lib/panel/i18n/index.d.ts +7 -6
- package/lib/panel/i18n/index.js +39 -23
- package/lib/panel/i18n/index.wechat.js +13 -12
- package/lib/panel/normalizeNetwork.js +1 -1
- package/lib/panel/publishDps.js +1 -1
- package/lib/redirectTo/index.js +1 -0
- package/lib/utils.d.ts +5 -2
- package/lib/utils.js +46 -20
- package/lib/utils.wechat.d.ts +3 -0
- package/lib/utils.wechat.js +22 -6
- package/lib/viewAPI.d.ts +1 -0
- package/lib/viewAPI.js +4 -3
- package/package.json +8 -7
- package/@types/PlayNetKit.d.ts +0 -444
- package/lib/nativeRouters/scene.d.ts +0 -34
- package/lib/nativeRouters/scene.js +0 -60
package/lib/BizKit-3.2.7.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../@types/BizKit.d.ts" />
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { createFactory } from './utils';
|
|
4
|
+
const factory = createFactory('BizKit');
|
|
4
5
|
export const apiRequestByAtop = factory('apiRequestByAtop');
|
|
5
6
|
export const event = factory('event');
|
|
6
7
|
export const beginEvent = factory('beginEvent');
|
package/lib/DeviceKit-3.3.1.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../@types/DeviceKit.d.ts" />
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { createFactory } from './utils';
|
|
4
|
+
const factory = createFactory('DeviceKit');
|
|
4
5
|
export const unregisterLeaveBeaconFenceEvent = factory('unregisterLeaveBeaconFenceEvent', {
|
|
5
6
|
"namespace": "device"
|
|
6
7
|
});
|
package/lib/HomeKit-3.1.4.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../@types/HomeKit.d.ts" />
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { createFactory } from './utils';
|
|
4
|
+
const factory = createFactory('HomeKit');
|
|
4
5
|
export const home = {
|
|
5
6
|
getCurrentHomeInfo: factory('getCurrentHomeInfo', {
|
|
6
7
|
"namespace": "home"
|
|
@@ -9,4 +9,9 @@ export declare const map: {
|
|
|
9
9
|
registerGeofence: typeof ty.map.registerGeofence;
|
|
10
10
|
unregisterGeofence: typeof ty.map.unregisterGeofence;
|
|
11
11
|
updateGeofence: typeof ty.map.updateGeofence;
|
|
12
|
+
transformLocation: typeof ty.map.transformLocation;
|
|
13
|
+
reverseGeocodeLocation: typeof ty.map.reverseGeocodeLocation;
|
|
14
|
+
coordinateWGS84ToGCJ02: typeof ty.map.coordinateWGS84ToGCJ02;
|
|
15
|
+
coordinateGCJ02ToWGS84: typeof ty.map.coordinateGCJ02ToWGS84;
|
|
16
|
+
getMapType: typeof ty.map.getMapType;
|
|
12
17
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../@types/MapKit.d.ts" />
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { createFactory } from './utils';
|
|
4
|
+
const factory = createFactory('MapKit');
|
|
4
5
|
|
|
5
6
|
// ray 1.1.0 集成
|
|
6
7
|
export const map = {
|
|
@@ -30,5 +31,22 @@ export const map = {
|
|
|
30
31
|
}),
|
|
31
32
|
updateGeofence: factory('updateGeofence', {
|
|
32
33
|
"namespace": "map"
|
|
34
|
+
}),
|
|
35
|
+
// MapKit >=3.2.2 ray 1.4.38 新增
|
|
36
|
+
transformLocation: factory('transformLocation', {
|
|
37
|
+
"namespace": "map"
|
|
38
|
+
}),
|
|
39
|
+
// MapKit >=3.4.13 ray 1.4.41 新增
|
|
40
|
+
reverseGeocodeLocation: factory('reverseGeocodeLocation', {
|
|
41
|
+
"namespace": "map"
|
|
42
|
+
}),
|
|
43
|
+
coordinateWGS84ToGCJ02: factory('coordinateWGS84ToGCJ02', {
|
|
44
|
+
"namespace": "map"
|
|
45
|
+
}),
|
|
46
|
+
coordinateGCJ02ToWGS84: factory('coordinateGCJ02ToWGS84', {
|
|
47
|
+
"namespace": "map"
|
|
48
|
+
}),
|
|
49
|
+
getMapType: factory('getMapType', {
|
|
50
|
+
"namespace": "map"
|
|
33
51
|
})
|
|
34
52
|
};
|
package/lib/MiniKit-3.1.0.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/// <reference path="../@types/MiniKit.d.ts" />
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { createFactory } from './utils';
|
|
4
|
+
const factory = createFactory('MiniKit');
|
|
4
5
|
export const nativeDisabled = factory('nativeDisabled');
|
|
5
6
|
export const nativeInovke = factory('nativeInovke');
|
|
6
7
|
export const getPermissionConfig = factory('getPermissionConfig');
|
|
7
8
|
export const getPermissionConfigSync = factory('getPermissionConfigSync');
|
|
8
9
|
export const openSetting = factory('openSetting');
|
|
9
10
|
export const changeDebugMode = factory('changeDebugMode');
|
|
10
|
-
export const openHelpCenter = factory('openHelpCenter');
|
|
11
|
+
export const openHelpCenter = factory('openHelpCenter'); // 已废弃TTT能力封装有问题使用ty.router封装的api,见nativeRouters
|
|
11
12
|
export const showTabBarRedDot = factory('showTabBarRedDot');
|
|
12
13
|
export const showTabBar = factory('showTabBar');
|
|
13
14
|
export const setTabBarStyle = factory('setTabBarStyle');
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference path="../@types/OutdoorKit.d.ts" />
|
|
2
|
+
export declare const outdoor: {
|
|
3
|
+
bindSlaveDevice: typeof ty.outdoor.bindSlaveDevice;
|
|
4
|
+
currentDevice: typeof ty.outdoor.currentDevice;
|
|
5
|
+
getBoundDeviceIdList: typeof ty.outdoor.getBoundDeviceIdList;
|
|
6
|
+
getTTSData: typeof ty.outdoor.getTTSData;
|
|
7
|
+
getUnbindDeviceIdList: typeof ty.outdoor.getUnbindDeviceIdList;
|
|
8
|
+
isCallPhoneGranted: typeof ty.outdoor.isCallPhoneGranted;
|
|
9
|
+
requestCallPhonePermission: typeof ty.outdoor.requestCallPhonePermission;
|
|
10
|
+
saveDialViewTag: typeof ty.outdoor.saveDialViewTag;
|
|
11
|
+
saveTTSData: typeof ty.outdoor.saveTTSData;
|
|
12
|
+
switchDevice: typeof ty.outdoor.switchDevice;
|
|
13
|
+
unbindDevice: typeof ty.outdoor.unbindDevice;
|
|
14
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference path="../@types/OutdoorKit.d.ts" />
|
|
2
|
+
|
|
3
|
+
import { createFactory } from './utils';
|
|
4
|
+
const factory = createFactory('OutdoorKit');
|
|
5
|
+
export const outdoor = {
|
|
6
|
+
bindSlaveDevice: factory('bindSlaveDevice', {
|
|
7
|
+
"namespace": "outdoor"
|
|
8
|
+
}),
|
|
9
|
+
currentDevice: factory('currentDevice', {
|
|
10
|
+
"namespace": "outdoor"
|
|
11
|
+
}),
|
|
12
|
+
getBoundDeviceIdList: factory('getBoundDeviceIdList', {
|
|
13
|
+
"namespace": "outdoor"
|
|
14
|
+
}),
|
|
15
|
+
getTTSData: factory('getTTSData', {
|
|
16
|
+
"namespace": "outdoor"
|
|
17
|
+
}),
|
|
18
|
+
getUnbindDeviceIdList: factory('getUnbindDeviceIdList', {
|
|
19
|
+
"namespace": "outdoor"
|
|
20
|
+
}),
|
|
21
|
+
isCallPhoneGranted: factory('isCallPhoneGranted', {
|
|
22
|
+
"namespace": "outdoor"
|
|
23
|
+
}),
|
|
24
|
+
requestCallPhonePermission: factory('requestCallPhonePermission', {
|
|
25
|
+
"namespace": "outdoor"
|
|
26
|
+
}),
|
|
27
|
+
saveDialViewTag: factory('saveDialViewTag', {
|
|
28
|
+
"namespace": "outdoor"
|
|
29
|
+
}),
|
|
30
|
+
saveTTSData: factory('saveTTSData', {
|
|
31
|
+
"namespace": "outdoor"
|
|
32
|
+
}),
|
|
33
|
+
switchDevice: factory('switchDevice', {
|
|
34
|
+
"namespace": "outdoor"
|
|
35
|
+
}),
|
|
36
|
+
unbindDevice: factory('unbindDevice', {
|
|
37
|
+
"namespace": "outdoor"
|
|
38
|
+
})
|
|
39
|
+
};
|
package/lib/P2PKit-2.0.3.d.ts
CHANGED
|
@@ -24,4 +24,5 @@ export declare const p2p: {
|
|
|
24
24
|
offFileDownloadComplete: typeof ty.p2p.offFileDownloadComplete;
|
|
25
25
|
onStreamPacketReceive: typeof ty.p2p.onStreamPacketReceive;
|
|
26
26
|
offStreamPacketReceive: typeof ty.p2p.offStreamPacketReceive;
|
|
27
|
+
appendDownloadStream: typeof ty.p2p.appendDownloadStream;
|
|
27
28
|
};
|
package/lib/P2PKit-2.0.3.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../@types/MapKit.d.ts" />
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { createFactory } from './utils';
|
|
4
|
+
const factory = createFactory('P2PKit');
|
|
4
5
|
|
|
5
6
|
// ray 1.4.0 集成
|
|
6
7
|
export const p2p = {
|
|
@@ -75,5 +76,8 @@ export const p2p = {
|
|
|
75
76
|
}),
|
|
76
77
|
offStreamPacketReceive: factory('offStreamPacketReceive', {
|
|
77
78
|
"namespace": "p2p"
|
|
79
|
+
}),
|
|
80
|
+
appendDownloadStream: factory('appendDownloadStream', {
|
|
81
|
+
"namespace": "p2p"
|
|
78
82
|
})
|
|
79
83
|
};
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
/// <reference path="../@types/PlayNetKit.d.ts" />
|
|
2
1
|
export declare const playnet: {
|
|
3
|
-
autoConnectToAp:
|
|
4
|
-
getDeviceSecurityConfigs:
|
|
5
|
-
getPairConfigToken:
|
|
6
|
-
hasBlePermission:
|
|
7
|
-
hasLocalNetworkPermission:
|
|
8
|
-
hasPermission:
|
|
9
|
-
isSystemPopupInAutoConnectAp:
|
|
10
|
-
offBLEScanDevice:
|
|
11
|
-
offBLEStateChange:
|
|
12
|
-
offBlePermissionChange:
|
|
13
|
-
offWifiStateChange:
|
|
14
|
-
offlocalNetWorkPermissionChange:
|
|
15
|
-
onBLEScanDevice:
|
|
16
|
-
onBLEStateChange:
|
|
17
|
-
onBlePermissionChange:
|
|
18
|
-
onWifiStateChange:
|
|
19
|
-
onlocalNetWorkPermissionChange:
|
|
20
|
-
queryDeviceConfigState:
|
|
21
|
-
requestPermission:
|
|
22
|
-
resetDevice:
|
|
23
|
-
startActivator:
|
|
24
|
-
startBLEScanDevice:
|
|
25
|
-
stopActivator:
|
|
26
|
-
stopBLEScan:
|
|
2
|
+
autoConnectToAp: any;
|
|
3
|
+
getDeviceSecurityConfigs: any;
|
|
4
|
+
getPairConfigToken: any;
|
|
5
|
+
hasBlePermission: any;
|
|
6
|
+
hasLocalNetworkPermission: any;
|
|
7
|
+
hasPermission: any;
|
|
8
|
+
isSystemPopupInAutoConnectAp: any;
|
|
9
|
+
offBLEScanDevice: any;
|
|
10
|
+
offBLEStateChange: any;
|
|
11
|
+
offBlePermissionChange: any;
|
|
12
|
+
offWifiStateChange: any;
|
|
13
|
+
offlocalNetWorkPermissionChange: any;
|
|
14
|
+
onBLEScanDevice: any;
|
|
15
|
+
onBLEStateChange: any;
|
|
16
|
+
onBlePermissionChange: any;
|
|
17
|
+
onWifiStateChange: any;
|
|
18
|
+
onlocalNetWorkPermissionChange: any;
|
|
19
|
+
queryDeviceConfigState: any;
|
|
20
|
+
requestPermission: any;
|
|
21
|
+
resetDevice: any;
|
|
22
|
+
startActivator: any;
|
|
23
|
+
startBLEScanDevice: any;
|
|
24
|
+
stopActivator: any;
|
|
25
|
+
stopBLEScan: any;
|
|
27
26
|
};
|
package/lib/PlayNetKit-1.1.3.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../@types/PlayNetKit.d.ts" />
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { createFactory } from './utils';
|
|
4
|
+
const factory = createFactory('PlayNetKit');
|
|
4
5
|
export const playnet = {
|
|
5
6
|
autoConnectToAp: factory('autoConnectToAp', {
|
|
6
7
|
"namespace": "playnet"
|
package/lib/all-kits.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export * from './BaseKit-3.
|
|
1
|
+
export * from './BaseKit-3.11.0';
|
|
2
2
|
export * from './BizKit-3.2.7';
|
|
3
3
|
export * from './DeviceKit-3.3.1';
|
|
4
4
|
export * from './MiniKit-3.1.0';
|
|
5
5
|
export * from './PlayNetKit-1.1.3';
|
|
6
|
-
export * from './MapKit-3.
|
|
6
|
+
export * from './MapKit-3.4.13';
|
|
7
7
|
export * from './HomeKit-3.1.4';
|
|
8
8
|
export * from './P2PKit-2.0.3';
|
|
9
|
+
export * from './OutdoorKit-1.0.4';
|
|
9
10
|
import * as device from './DeviceKit-3.3.1';
|
|
10
11
|
export { device };
|
package/lib/all-kits.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export * from './BaseKit-3.
|
|
1
|
+
export * from './BaseKit-3.11.0';
|
|
2
2
|
export * from './BizKit-3.2.7';
|
|
3
3
|
export * from './DeviceKit-3.3.1';
|
|
4
4
|
export * from './MiniKit-3.1.0';
|
|
5
5
|
export * from './PlayNetKit-1.1.3';
|
|
6
|
-
export * from './MapKit-3.
|
|
6
|
+
export * from './MapKit-3.4.13';
|
|
7
7
|
export * from './HomeKit-3.1.4';
|
|
8
8
|
export * from './P2PKit-2.0.3';
|
|
9
|
+
export * from './OutdoorKit-1.0.4';
|
|
9
10
|
import * as device from './DeviceKit-3.3.1';
|
|
10
11
|
export { device };
|
package/lib/cloud/alarm.js
CHANGED
|
@@ -8,7 +8,7 @@ import { THING } from '../constants';
|
|
|
8
8
|
*/
|
|
9
9
|
const getDevAlarmList = devId => {
|
|
10
10
|
return requestCloud({
|
|
11
|
-
api:
|
|
11
|
+
api: "".concat(THING, ".m.linkage.rule.product.query"),
|
|
12
12
|
version: '1.0',
|
|
13
13
|
data: {
|
|
14
14
|
devId
|
|
@@ -24,7 +24,7 @@ const getDevAlarmList = devId => {
|
|
|
24
24
|
*/
|
|
25
25
|
const setAlarmSwitch = params => {
|
|
26
26
|
return requestCloud({
|
|
27
|
-
api:
|
|
27
|
+
api: "".concat(THING, ".m.linkage.dev.warn.set"),
|
|
28
28
|
version: '1.0',
|
|
29
29
|
data: _objectSpread({}, params)
|
|
30
30
|
});
|
package/lib/cloud/core.js
CHANGED
package/lib/cloud/device.d.ts
CHANGED
|
@@ -60,4 +60,28 @@ declare const getDevProperty: (params: IGetDevProperty) => Promise<string>;
|
|
|
60
60
|
* @param {string} devId 设备Id
|
|
61
61
|
*/
|
|
62
62
|
declare const saveDevProperty: (params: ISaveDevProperty) => Promise<boolean>;
|
|
63
|
-
export
|
|
63
|
+
export interface GetRemoteLocalRelationParams {
|
|
64
|
+
/**
|
|
65
|
+
* 遥控器设备id
|
|
66
|
+
*/
|
|
67
|
+
devId: string;
|
|
68
|
+
/**
|
|
69
|
+
* 设备类型
|
|
70
|
+
* @default 0 // 缺省为0表示Zigbee
|
|
71
|
+
*/
|
|
72
|
+
type: number;
|
|
73
|
+
}
|
|
74
|
+
export interface GetRemoteLocalRelationResponse {
|
|
75
|
+
locals: Array<{
|
|
76
|
+
categoryCode: string;
|
|
77
|
+
code: string;
|
|
78
|
+
localId: string;
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 面板获取配网后分配的localIds
|
|
83
|
+
* @param params { devId: string, type: number }
|
|
84
|
+
* @returns
|
|
85
|
+
*/
|
|
86
|
+
declare const getRemoteLocalRelation: (params: GetRemoteLocalRelationParams) => Promise<GetRemoteLocalRelationResponse>;
|
|
87
|
+
export { getDpsInfos, updateDpName, getGroupDpsInfos, updateGroupDpName, getWeatherQuality, getWeathers, saveCustomizePosition, getCustomizePosition, getDevProperty, saveDevProperty, getRemoteLocalRelation, };
|
package/lib/cloud/device.js
CHANGED
|
@@ -52,7 +52,7 @@ const getGroupDpsInfos = groupId => {
|
|
|
52
52
|
*/
|
|
53
53
|
const updateGroupDpName = params => {
|
|
54
54
|
return requestCloud({
|
|
55
|
-
api:
|
|
55
|
+
api: "".concat(THING, ".m.group.dpname.update"),
|
|
56
56
|
version: '1.0',
|
|
57
57
|
data: _objectSpread({}, params)
|
|
58
58
|
});
|
|
@@ -65,7 +65,7 @@ const updateGroupDpName = params => {
|
|
|
65
65
|
*/
|
|
66
66
|
const getWeatherQuality = params => {
|
|
67
67
|
return requestCloud({
|
|
68
|
-
api:
|
|
68
|
+
api: "".concat(THING, ".m.public.weather.get"),
|
|
69
69
|
version: '2.0',
|
|
70
70
|
data: _objectSpread({}, params)
|
|
71
71
|
});
|
|
@@ -78,7 +78,7 @@ const getWeatherQuality = params => {
|
|
|
78
78
|
*/
|
|
79
79
|
const getWeathers = params => {
|
|
80
80
|
return requestCloud({
|
|
81
|
-
api:
|
|
81
|
+
api: "".concat(THING, ".m.public.weathers.get"),
|
|
82
82
|
version: '2.0',
|
|
83
83
|
data: _objectSpread({}, params)
|
|
84
84
|
});
|
|
@@ -93,7 +93,7 @@ const getWeathers = params => {
|
|
|
93
93
|
*/
|
|
94
94
|
const saveCustomizePosition = params => {
|
|
95
95
|
return requestCloud({
|
|
96
|
-
api:
|
|
96
|
+
api: "".concat(THING, ".m.device.customize.position.save"),
|
|
97
97
|
version: '1.0',
|
|
98
98
|
data: _objectSpread({}, params)
|
|
99
99
|
});
|
|
@@ -105,7 +105,7 @@ const saveCustomizePosition = params => {
|
|
|
105
105
|
*/
|
|
106
106
|
const getCustomizePosition = params => {
|
|
107
107
|
return requestCloud({
|
|
108
|
-
api:
|
|
108
|
+
api: "".concat(THING, ".m.device.customize.position.get"),
|
|
109
109
|
version: '1.0',
|
|
110
110
|
data: _objectSpread({}, params)
|
|
111
111
|
});
|
|
@@ -134,4 +134,18 @@ const saveDevProperty = params => {
|
|
|
134
134
|
data: _objectSpread({}, params)
|
|
135
135
|
});
|
|
136
136
|
};
|
|
137
|
-
|
|
137
|
+
/**
|
|
138
|
+
* 面板获取配网后分配的localIds
|
|
139
|
+
* @param params { devId: string, type: number }
|
|
140
|
+
* @returns
|
|
141
|
+
*/
|
|
142
|
+
const getRemoteLocalRelation = params => {
|
|
143
|
+
return requestCloud({
|
|
144
|
+
api: "".concat(THING, ".p.remote.local.relation.get"),
|
|
145
|
+
data: _objectSpread({
|
|
146
|
+
type: 0
|
|
147
|
+
}, params),
|
|
148
|
+
version: '1.0'
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
export { getDpsInfos, updateDpName, getGroupDpsInfos, updateGroupDpName, getWeatherQuality, getWeathers, saveCustomizePosition, getCustomizePosition, getDevProperty, saveDevProperty, getRemoteLocalRelation };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
## 门锁 API
|
|
2
|
+
|
|
3
|
+
> https://wiki.tuya-inc.com:7799/page/1782299639387521068#90E8B7
|
|
4
|
+
|
|
5
|
+
````
|
|
6
|
+
```javascript
|
|
7
|
+
let apis = [
|
|
8
|
+
'tuya.m.zigbee.lock.remotepwd.execute',
|
|
9
|
+
'tuya.m.device.lock.remote.unlock',
|
|
10
|
+
'tuya.m.device.lock.remote.unlock.available',
|
|
11
|
+
'tuya.m.device.lock.history.latest',
|
|
12
|
+
'tuya.m.device.lock.history.list',
|
|
13
|
+
'tuya.m.device.lock.log.latest',
|
|
14
|
+
'tuya.m.device.lock.log.list',
|
|
15
|
+
'tuya.m.device.lock.log.upload',
|
|
16
|
+
'tuya.m.lock.album.media.list',
|
|
17
|
+
'tuya.m.device.member.get',
|
|
18
|
+
'tuya.m.device.member.detail.list',
|
|
19
|
+
'tuya.m.device.member.remove',
|
|
20
|
+
'tuya.m.device.member.removed',
|
|
21
|
+
'tuya.m.device.lock.sync.batch',
|
|
22
|
+
'tuya.m.device.user.time.schedule.update',
|
|
23
|
+
'tuya.m.device.user.unlock.offline',
|
|
24
|
+
'tuya.m.device.member.opmode.pwd.validate',
|
|
25
|
+
'tuya.m.device.member.opmode.add',
|
|
26
|
+
'tuya.m.device.member.opmode.remove',
|
|
27
|
+
'tuya.m.device.user.verifycode.send',
|
|
28
|
+
'tuya.m.device.member.opmode.update',
|
|
29
|
+
'tuya.m.device.member.opmode.detail',
|
|
30
|
+
'tuya.m.device.dp.sn.get',
|
|
31
|
+
'tuya.m.device.lock.dynapwd.get',
|
|
32
|
+
'tuya.m.device.lock.temppwd.validate',
|
|
33
|
+
'tuya.m.device.lock.temppwd.validate_2.0',
|
|
34
|
+
'tuya.m.device.lock.temppwd.create',
|
|
35
|
+
'tuya.m.device.lock.temppwd.update',
|
|
36
|
+
'tuya.m.device.lock.temppwd.name',
|
|
37
|
+
'tuya.m.device.lock.temppwd.remove',
|
|
38
|
+
'tuya.m.device.lock.share.available',
|
|
39
|
+
'tuya.m.device.lock.offlinepwd.get',
|
|
40
|
+
'tuya.m.device.lock.offlinepwd.revoke',
|
|
41
|
+
'tuya.m.device.lock.offlinepwd.name.update',
|
|
42
|
+
'tuya.m.device.lock.offlinepwd.revocable',
|
|
43
|
+
'tuya.m.device.lock.auth.list',
|
|
44
|
+
'tuya.m.device.lock.auth.list.invalid',
|
|
45
|
+
'tuya.m.device.lock.auth.list.clear',
|
|
46
|
+
'tuya.m.device.lock.key.virtual.add',
|
|
47
|
+
'tuya.m.device.lock.key.virtual.update',
|
|
48
|
+
'tuya.m.device.lock.key.virtual.phase',
|
|
49
|
+
'tuya.m.device.lock.key.virtual.name',
|
|
50
|
+
'tuya.m.device.lock.key.virtual.remove',
|
|
51
|
+
'tuya.m.device.unlock.waitassign',
|
|
52
|
+
'tuya.m.device.unlock.assignlist',
|
|
53
|
+
'tuya.m.device.user.unlock.allocate',
|
|
54
|
+
'tuya.m.device.props.save',
|
|
55
|
+
'tuya.m.device.props.fetch',
|
|
56
|
+
'tuya.m.device.member.list',
|
|
57
|
+
'tuya.m.device.opmode.sync.rise',
|
|
58
|
+
'tuya.m.i18n.date.template.get',
|
|
59
|
+
'tuya.m.device.active.date',
|
|
60
|
+
'tuya.m.device.track.details'
|
|
61
|
+
]
|
|
62
|
+
````
|