@ray-js/api 1.6.0-beta.9 → 1.6.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.
Files changed (84) hide show
  1. package/@types/BaseKit.d.ts +837 -37
  2. package/@types/BizKit.d.ts +1831 -85
  3. package/@types/DeviceKit.d.ts +581 -58
  4. package/@types/HomeKit.d.ts +0 -74
  5. package/@types/MiniKit.d.ts +411 -8
  6. package/@types/api-cloud.d.ts +145 -0
  7. package/@types/api-extend.d.ts +42 -10
  8. package/@types/api.d.ts +4 -0
  9. package/@types/energy.d.ts +250 -0
  10. package/@types/gateway.d.ts +146 -0
  11. package/@types/health.d.ts +309 -0
  12. package/lib/{BaseKit-3.11.0.d.ts → BaseKit-3.14.3.d.ts} +29 -1
  13. package/lib/{BaseKit-3.11.0.js → BaseKit-3.14.3.js} +32 -1
  14. package/lib/BizKit-4.10.4.d.ts +84 -0
  15. package/lib/{BizKit-3.2.7.js → BizKit-4.10.4.js} +46 -5
  16. package/lib/{DeviceKit-3.3.1.d.ts → DeviceKit-4.9.0.d.ts} +22 -1
  17. package/lib/{DeviceKit-3.3.1.js → DeviceKit-4.9.0.js} +66 -0
  18. package/lib/HomeKit-3.1.4.d.ts +0 -1
  19. package/lib/MapKit-3.4.13.d.ts +0 -1
  20. package/lib/{MiniKit-3.1.0.d.ts → MiniKit-3.12.1.d.ts} +11 -1
  21. package/lib/{MiniKit-3.1.0.js → MiniKit-3.12.1.js} +12 -1
  22. package/lib/OutdoorKit-1.0.4.d.ts +0 -1
  23. package/lib/P2PKit-2.0.3.d.ts +0 -1
  24. package/lib/PlayNetKit-1.1.3.d.ts +24 -24
  25. package/lib/all-kits.d.ts +5 -5
  26. package/lib/all-kits.js +5 -5
  27. package/lib/cloud/device.d.ts +3 -3
  28. package/lib/cloud/energy.d.ts +15 -0
  29. package/lib/cloud/energy.js +55 -0
  30. package/lib/cloud/gateway.d.ts +11 -0
  31. package/lib/cloud/gateway.js +39 -0
  32. package/lib/cloud/health.d.ts +19 -0
  33. package/lib/cloud/health.js +71 -0
  34. package/lib/cloud/index.d.ts +4 -0
  35. package/lib/cloud/index.js +7 -1
  36. package/lib/cloud/interface.d.ts +40 -1
  37. package/lib/cloud/laser-clean/index.d.ts +3 -0
  38. package/lib/cloud/laser-clean/index.js +3 -0
  39. package/lib/cloud/laser-clean/map.d.ts +3 -0
  40. package/lib/cloud/laser-clean/map.js +4 -0
  41. package/lib/cloud/laser-clean/record.d.ts +3 -0
  42. package/lib/cloud/laser-clean/record.js +4 -0
  43. package/lib/cloud/laser-clean/voice.d.ts +2 -0
  44. package/lib/cloud/laser-clean/voice.js +3 -0
  45. package/lib/cloud/recipe/basket.js +1 -0
  46. package/lib/cloud/recipe/custom.js +1 -0
  47. package/lib/cloud/recipe/menu.js +1 -0
  48. package/lib/cloud/recipe/query.js +1 -0
  49. package/lib/cloud/recipe/score.js +1 -0
  50. package/lib/cloud/recipe/star.js +1 -0
  51. package/lib/getBoundingClientRect/index.thing.js +1 -0
  52. package/lib/getBoundingClientRect/index.wechat.js +1 -0
  53. package/lib/getCdnUrl/index.thing.js +22 -18
  54. package/lib/hideTabBar/index.d.ts +4 -5
  55. package/lib/index.d.ts +0 -1
  56. package/lib/navigateBack/index.d.ts +0 -1
  57. package/lib/navigateTo/index.d.ts +0 -1
  58. package/lib/panel/devInfo/index.js +7 -1
  59. package/lib/panel/i18n/index.js +4 -0
  60. package/lib/panel/i18n/index.wechat.js +4 -0
  61. package/lib/panel/publishDps.js +2 -0
  62. package/lib/reLaunch/index.d.ts +0 -1
  63. package/lib/redirectTo/index.d.ts +0 -1
  64. package/lib/redirectTo/index.js +1 -0
  65. package/lib/requestCloud/index.d.ts +0 -1
  66. package/lib/setNavigationBarColor/index.d.ts +0 -1
  67. package/lib/setNavigationBarTitle/index.d.ts +0 -1
  68. package/lib/showTabBar/index.d.ts +4 -5
  69. package/lib/switchTab/index.d.ts +0 -1
  70. package/lib/utils.wechat.js +1 -0
  71. package/lib/viewAPI.d.ts +1 -1
  72. package/lib/viewAPI.js +2 -1
  73. package/package.json +8 -8
  74. package/lib/BizKit-3.2.7.d.ts +0 -46
  75. package/lib/cloud/doorlock/README.md +0 -62
  76. package/lib/cloud/doorlock/auth.md +0 -323
  77. package/lib/cloud/doorlock/device.md +0 -265
  78. package/lib/cloud/doorlock/log.md +0 -153
  79. package/lib/cloud/doorlock/member-opmode.md +0 -279
  80. package/lib/cloud/doorlock/member.md +0 -276
  81. package/lib/cloud/doorlock/offline-pwd.md +0 -155
  82. package/lib/cloud/doorlock/temp-pwd.md +0 -362
  83. package/lib/cloud/doorlock/unlock-method.md +0 -121
  84. package/lib/cloud/doorlock/unlock.md +0 -222
@@ -65,4 +65,15 @@ export const hideBoardTitleIconSync = factory('hideBoardTitleIconSync');
65
65
  export const setBoardIcon = factory('setBoardIcon');
66
66
  export const setBoardIconSync = factory('setBoardIconSync');
67
67
  export const showBoardTitleIcon = factory('showBoardTitleIcon');
68
- export const showBoardTitleIconSync = factory('showBoardTitleIconSync');
68
+ export const showBoardTitleIconSync = factory('showBoardTitleIconSync');
69
+ export const getMiniAppConfig = factory('getMiniAppConfig');
70
+ export const getMiniAppConfigSync = factory('getMiniAppConfigSync');
71
+ export const showBoard = factory('showBoard');
72
+ export const resetBoardMenus = factory('resetBoardMenus');
73
+ export const resetSystemMenus = factory('resetSystemMenus');
74
+ export const showRedBot = factory('showRedBot');
75
+ export const hiddenRedBot = factory('hiddenRedBot');
76
+ export const hideRenderLoading = factory('hideRenderLoading');
77
+ export const setBackgroundImage = factory('setBackgroundImage');
78
+ export const widgetRemove = factory('widgetRemove');
79
+ export const createNativeEventManager = factory('createNativeEventManager');
@@ -1,4 +1,3 @@
1
- /// <reference path="../@types/OutdoorKit.d.ts" />
2
1
  export declare const outdoor: {
3
2
  bindSlaveDevice: typeof ty.outdoor.bindSlaveDevice;
4
3
  currentDevice: typeof ty.outdoor.currentDevice;
@@ -1,4 +1,3 @@
1
- /// <reference path="../@types/MapKit.d.ts" />
2
1
  export declare const p2p: {
3
2
  P2PSDKInit: typeof ty.p2p.P2PSDKInit;
4
3
  deInitSDK: typeof ty.p2p.deInitSDK;
@@ -1,26 +1,26 @@
1
1
  export declare const playnet: {
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;
2
+ autoConnectToAp: typeof ty.playnet.autoConnectToAp;
3
+ getDeviceSecurityConfigs: typeof ty.playnet.getDeviceSecurityConfigs;
4
+ getPairConfigToken: typeof ty.playnet.getPairConfigToken;
5
+ hasBlePermission: typeof ty.playnet.hasBlePermission;
6
+ hasLocalNetworkPermission: typeof ty.playnet.hasLocalNetworkPermission;
7
+ hasPermission: typeof ty.playnet.hasPermission;
8
+ isSystemPopupInAutoConnectAp: typeof ty.playnet.isSystemPopupInAutoConnectAp;
9
+ offBLEScanDevice: typeof ty.playnet.offBLEScanDevice;
10
+ offBLEStateChange: typeof ty.playnet.offBLEStateChange;
11
+ offBlePermissionChange: typeof ty.playnet.offBlePermissionChange;
12
+ offWifiStateChange: typeof ty.playnet.offWifiStateChange;
13
+ offlocalNetWorkPermissionChange: typeof ty.playnet.offlocalNetWorkPermissionChange;
14
+ onBLEScanDevice: typeof ty.playnet.onBLEScanDevice;
15
+ onBLEStateChange: typeof ty.playnet.onBLEStateChange;
16
+ onBlePermissionChange: typeof ty.playnet.onBlePermissionChange;
17
+ onWifiStateChange: typeof ty.playnet.onWifiStateChange;
18
+ onlocalNetWorkPermissionChange: typeof ty.playnet.onlocalNetWorkPermissionChange;
19
+ queryDeviceConfigState: typeof ty.playnet.queryDeviceConfigState;
20
+ requestPermission: typeof ty.playnet.requestPermission;
21
+ resetDevice: typeof ty.playnet.resetDevice;
22
+ startActivator: typeof ty.playnet.startActivator;
23
+ startBLEScanDevice: typeof ty.playnet.startBLEScanDevice;
24
+ stopActivator: typeof ty.playnet.stopActivator;
25
+ stopBLEScan: typeof ty.playnet.stopBLEScan;
26
26
  };
package/lib/all-kits.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export * from './BaseKit-3.11.0';
2
- export * from './BizKit-3.2.7';
3
- export * from './DeviceKit-3.3.1';
4
- export * from './MiniKit-3.1.0';
1
+ export * from './BaseKit-3.14.3';
2
+ export * from './BizKit-4.10.4';
3
+ export * from './DeviceKit-4.9.0';
4
+ export * from './MiniKit-3.12.1';
5
5
  export * from './PlayNetKit-1.1.3';
6
6
  export * from './MapKit-3.4.13';
7
7
  export * from './HomeKit-3.1.4';
8
8
  export * from './P2PKit-2.0.3';
9
9
  export * from './OutdoorKit-1.0.4';
10
- import * as device from './DeviceKit-3.3.1';
10
+ import * as device from './DeviceKit-4.9.0';
11
11
  export { device };
package/lib/all-kits.js CHANGED
@@ -1,11 +1,11 @@
1
- export * from './BaseKit-3.11.0';
2
- export * from './BizKit-3.2.7';
3
- export * from './DeviceKit-3.3.1';
4
- export * from './MiniKit-3.1.0';
1
+ export * from './BaseKit-3.14.3';
2
+ export * from './BizKit-4.10.4';
3
+ export * from './DeviceKit-4.9.0';
4
+ export * from './MiniKit-3.12.1';
5
5
  export * from './PlayNetKit-1.1.3';
6
6
  export * from './MapKit-3.4.13';
7
7
  export * from './HomeKit-3.1.4';
8
8
  export * from './P2PKit-2.0.3';
9
9
  export * from './OutdoorKit-1.0.4';
10
- import * as device from './DeviceKit-3.3.1';
10
+ import * as device from './DeviceKit-4.9.0';
11
11
  export { device };
@@ -1,10 +1,10 @@
1
- import { IGetDpsInfos, IUpdateDpName, IUpdateGroupDpName, IGetWeatherQuality, IGetWeathers, ISaveCustomizePosition, IGetCustomizePosition, IGetDpsInfosResponse, IGetGroupDpsInfosResponse, IGetWeatherQualityResponse, IGetCustomizePositionResponse, IGetWeathersResponse, IGetDevProperty, ISaveDevProperty } from './interface';
1
+ import { IGetDpsInfos, IUpdateDpName, IUpdateGroupDpName, IGetWeatherQuality, IGetWeathers, ISaveCustomizePosition, IGetCustomizePosition, IGetDpsInfosResponse, IGetGroupDpsInfosResponse, IGetWeatherQualityResponse, IGetCustomizePositionResponse, IGetWeathersResponse, IGetDevProperty, IGetDevPropertyResponse, ISaveDevProperty } from './interface';
2
2
  /**
3
3
  * 获取设备所有 DP 信息
4
4
  * @param {string} gwId 网关Id, 直连设备值同 devId,子设备则传网关的设备id
5
5
  * @param {string} devId 设备Id
6
6
  */
7
- declare const getDpsInfos: (params: IGetDpsInfos) => Promise<IGetDpsInfosResponse>;
7
+ declare const getDpsInfos: (params: IGetDpsInfos) => Promise<IGetDpsInfosResponse[]>;
8
8
  /**
9
9
  * 更新设备 DP 名称
10
10
  * @param {string} devId 设备Id
@@ -54,7 +54,7 @@ declare const getCustomizePosition: (params: IGetCustomizePosition) => Promise<I
54
54
  * 获取设备属性
55
55
  * @param {string} devId 设备Id
56
56
  */
57
- declare const getDevProperty: (params: IGetDevProperty) => Promise<string>;
57
+ declare const getDevProperty: (params: IGetDevProperty) => Promise<IGetDevPropertyResponse>;
58
58
  /**
59
59
  * 保存设备属性
60
60
  * @param {string} devId 设备Id
@@ -0,0 +1,15 @@
1
+ export declare const energy: {
2
+ getDeviceDataMultipleSum: typeof ty.energy.getDeviceDataMultipleSum;
3
+ getInverterDeviceInfo: typeof ty.energy.getInverterDeviceInfo;
4
+ getInverterPanelInfo: typeof ty.energy.getInverterPanelInfo;
5
+ getInverterFlowInfo: typeof ty.energy.getInverterFlowInfo;
6
+ getPropertyInfo: typeof ty.energy.getPropertyInfo;
7
+ saveProperty: typeof ty.energy.saveProperty;
8
+ getDeviceAlarmEvent: typeof ty.energy.getDeviceAlarmEvent;
9
+ getDeviceAlarmEventDetail: typeof ty.energy.getDeviceAlarmEventDetail;
10
+ getDeviceEnergySavingData: typeof ty.energy.getDeviceEnergySavingData;
11
+ getPropertySettingTranslate: typeof ty.energy.getPropertySettingTranslate;
12
+ getInverterDeviceModel: typeof ty.energy.getInverterDeviceModel;
13
+ getDevicePropertySettingTranslate: typeof ty.energy.getDevicePropertySettingTranslate;
14
+ setDevicePropertySetting: typeof ty.energy.setDevicePropertySetting;
15
+ };
@@ -0,0 +1,55 @@
1
+ import { factory } from '../utils';
2
+ const getDeviceDataMultipleSum = factory('getDeviceDataMultipleSum', {
3
+ namespace: 'energy'
4
+ });
5
+ const getInverterDeviceInfo = factory('getInverterDeviceInfo', {
6
+ namespace: 'energy'
7
+ });
8
+ const getInverterPanelInfo = factory('getInverterPanelInfo', {
9
+ namespace: 'energy'
10
+ });
11
+ const getInverterFlowInfo = factory('getInverterFlowInfo', {
12
+ namespace: 'energy'
13
+ });
14
+ const getPropertyInfo = factory('getPropertyInfo', {
15
+ namespace: 'energy'
16
+ });
17
+ const saveProperty = factory('saveProperty', {
18
+ namespace: 'energy'
19
+ });
20
+ const getDeviceAlarmEvent = factory('getDeviceAlarmEvent', {
21
+ namespace: 'energy'
22
+ });
23
+ const getDeviceAlarmEventDetail = factory('getDeviceAlarmEventDetail', {
24
+ namespace: 'energy'
25
+ });
26
+ const getDeviceEnergySavingData = factory('getDeviceEnergySavingData', {
27
+ namespace: 'energy'
28
+ });
29
+ const getPropertySettingTranslate = factory('getPropertySettingTranslate', {
30
+ namespace: 'energy'
31
+ });
32
+ const getInverterDeviceModel = factory('getInverterDeviceModel', {
33
+ namespace: 'energy'
34
+ });
35
+ const getDevicePropertySettingTranslate = factory('getDevicePropertySettingTranslate', {
36
+ namespace: 'energy'
37
+ });
38
+ const setDevicePropertySetting = factory('setDevicePropertySetting', {
39
+ namespace: 'energy'
40
+ });
41
+ export const energy = {
42
+ getDeviceDataMultipleSum,
43
+ getInverterDeviceInfo,
44
+ getInverterPanelInfo,
45
+ getInverterFlowInfo,
46
+ getPropertyInfo,
47
+ saveProperty,
48
+ getDeviceAlarmEvent,
49
+ getDeviceAlarmEventDetail,
50
+ getDeviceEnergySavingData,
51
+ getPropertySettingTranslate,
52
+ getInverterDeviceModel,
53
+ getDevicePropertySettingTranslate,
54
+ setDevicePropertySetting
55
+ };
@@ -0,0 +1,11 @@
1
+ export declare const gateway: {
2
+ sendCmdForRefreshDeviceLQI: typeof ty.gateway.sendCmdForRefreshDeviceLQI;
3
+ getLastDeviceLQI: typeof ty.gateway.getLastDeviceLQI;
4
+ getSeniorAbility: typeof ty.gateway.getSeniorAbility;
5
+ getGatewaySubDevLimit: typeof ty.gateway.getGatewaySubDevLimit;
6
+ updateRelationMesh: typeof ty.gateway.updateRelationMesh;
7
+ updateRelationBlue: typeof ty.gateway.updateRelationBlue;
8
+ updateRelationBeacon: typeof ty.gateway.updateRelationBeacon;
9
+ getGatewayAbility: typeof ty.gateway.getGatewayAbility;
10
+ getSecurityDeviceLog: typeof ty.gateway.getSecurityDeviceLog;
11
+ };
@@ -0,0 +1,39 @@
1
+ import { factory } from '../utils';
2
+ const sendCmdForRefreshDeviceLQI = factory('sendCmdForRefreshDeviceLQI', {
3
+ namespace: 'gateway'
4
+ });
5
+ const getLastDeviceLQI = factory('getLastDeviceLQI', {
6
+ namespace: 'gateway'
7
+ });
8
+ const getSeniorAbility = factory('getSeniorAbility', {
9
+ namespace: 'gateway'
10
+ });
11
+ const getGatewaySubDevLimit = factory('getGatewaySubDevLimit', {
12
+ namespace: 'gateway'
13
+ });
14
+ const updateRelationMesh = factory('updateRelationMesh', {
15
+ namespace: 'gateway'
16
+ });
17
+ const updateRelationBlue = factory('updateRelationBlue', {
18
+ namespace: 'gateway'
19
+ });
20
+ const updateRelationBeacon = factory('updateRelationBeacon', {
21
+ namespace: 'gateway'
22
+ });
23
+ const getGatewayAbility = factory('getGatewayAbility', {
24
+ namespace: 'gateway'
25
+ });
26
+ const getSecurityDeviceLog = factory('getSecurityDeviceLog', {
27
+ namespace: 'gateway'
28
+ });
29
+ export const gateway = {
30
+ sendCmdForRefreshDeviceLQI,
31
+ getLastDeviceLQI,
32
+ getSeniorAbility,
33
+ getGatewaySubDevLimit,
34
+ updateRelationMesh,
35
+ updateRelationBlue,
36
+ updateRelationBeacon,
37
+ getGatewayAbility,
38
+ getSecurityDeviceLog
39
+ };
@@ -0,0 +1,19 @@
1
+ export declare const health: {
2
+ addPanelUser: typeof ty.health.addPanelUser;
3
+ updatePanelUser: typeof ty.health.updatePanelUser;
4
+ deletePanelUser: typeof ty.health.deletePanelUser;
5
+ getPanelUserList: typeof ty.health.getPanelUserList;
6
+ getDefaultAvatarList: typeof ty.health.getDefaultAvatarList;
7
+ reportPanelBpgData: typeof ty.health.reportPanelBpgData;
8
+ reportSingleBpgData: typeof ty.health.reportSingleBpgData;
9
+ updateBpgDataRemark: typeof ty.health.updateBpgDataRemark;
10
+ deleteBpgData: typeof ty.health.deleteBpgData;
11
+ getBpgDataHistory: typeof ty.health.getBpgDataHistory;
12
+ getBpgDataTrendLatest: typeof ty.health.getBpgDataTrendLatest;
13
+ getBpgDataLevnum: typeof ty.health.getBpgDataLevnum;
14
+ getBpgDataTrend: typeof ty.health.getBpgDataTrend;
15
+ getBpgDataDays: typeof ty.health.getBpgDataDays;
16
+ getBpgDataUnallocated: typeof ty.health.getBpgDataUnallocated;
17
+ updateBpgDataUnallocated: typeof ty.health.updateBpgDataUnallocated;
18
+ deleteBpgDataUnallocated: typeof ty.health.deleteBpgDataUnallocated;
19
+ };
@@ -0,0 +1,71 @@
1
+ import { factory } from '../utils';
2
+ const addPanelUser = factory('addPanelUser', {
3
+ namespace: 'health'
4
+ });
5
+ const updatePanelUser = factory('updatePanelUser', {
6
+ namespace: 'health'
7
+ });
8
+ const deletePanelUser = factory('deletePanelUser', {
9
+ namespace: 'health'
10
+ });
11
+ const getPanelUserList = factory('getPanelUserList', {
12
+ namespace: 'health'
13
+ });
14
+ const getDefaultAvatarList = factory('getDefaultAvatarList', {
15
+ namespace: 'health'
16
+ });
17
+ const reportPanelBpgData = factory('reportPanelBpgData', {
18
+ namespace: 'health'
19
+ });
20
+ const reportSingleBpgData = factory('reportSingleBpgData', {
21
+ namespace: 'health'
22
+ });
23
+ const updateBpgDataRemark = factory('updateBpgDataRemark', {
24
+ namespace: 'health'
25
+ });
26
+ const deleteBpgData = factory('deleteBpgData', {
27
+ namespace: 'health'
28
+ });
29
+ const getBpgDataHistory = factory('getBpgDataHistory', {
30
+ namespace: 'health'
31
+ });
32
+ const getBpgDataTrendLatest = factory('getBpgDataTrendLatest', {
33
+ namespace: 'health'
34
+ });
35
+ const getBpgDataLevnum = factory('getBpgDataLevnum', {
36
+ namespace: 'health'
37
+ });
38
+ const getBpgDataTrend = factory('getBpgDataTrend', {
39
+ namespace: 'health'
40
+ });
41
+ const getBpgDataDays = factory('getBpgDataDays', {
42
+ namespace: 'health'
43
+ });
44
+ const getBpgDataUnallocated = factory('getBpgDataUnallocated', {
45
+ namespace: 'health'
46
+ });
47
+ const updateBpgDataUnallocated = factory('updateBpgDataUnallocated', {
48
+ namespace: 'health'
49
+ });
50
+ const deleteBpgDataUnallocated = factory('deleteBpgDataUnallocated', {
51
+ namespace: 'health'
52
+ });
53
+ export const health = {
54
+ addPanelUser,
55
+ updatePanelUser,
56
+ deletePanelUser,
57
+ getPanelUserList,
58
+ getDefaultAvatarList,
59
+ reportPanelBpgData,
60
+ reportSingleBpgData,
61
+ updateBpgDataRemark,
62
+ deleteBpgData,
63
+ getBpgDataHistory,
64
+ getBpgDataTrendLatest,
65
+ getBpgDataLevnum,
66
+ getBpgDataTrend,
67
+ getBpgDataDays,
68
+ getBpgDataUnallocated,
69
+ updateBpgDataUnallocated,
70
+ deleteBpgDataUnallocated
71
+ };
@@ -8,3 +8,7 @@ export * from './remoteGroup';
8
8
  export * from './outdoor';
9
9
  export * from './doorlock';
10
10
  export * from './recipe';
11
+ export * from './laser-clean';
12
+ export * from './health';
13
+ export * from './gateway';
14
+ export * from './energy';
@@ -12,4 +12,10 @@ export * from './outdoor';
12
12
  // 门锁
13
13
  export * from './doorlock';
14
14
  // 菜谱
15
- export * from './recipe';
15
+ export * from './recipe';
16
+
17
+ // 激光清洁
18
+ export * from './laser-clean';
19
+ export * from './health';
20
+ export * from './gateway';
21
+ export * from './energy';
@@ -1268,7 +1268,40 @@ export interface IGetDevProperty {
1268
1268
  */
1269
1269
  code: string;
1270
1270
  }
1271
- export type IGetDevPropertyResponse = string;
1271
+ export type IGetDevPropertyResponse = Array<{
1272
+ /**
1273
+ * 业务类型
1274
+ */
1275
+ bizType: number;
1276
+ /**
1277
+ * 设备自定义属性 key
1278
+ */
1279
+ code: string;
1280
+ /**
1281
+ * 设备 ID
1282
+ */
1283
+ devId: string;
1284
+ /**
1285
+ * 创建时间
1286
+ */
1287
+ gmtCreate: number;
1288
+ /**
1289
+ * 修改时间
1290
+ */
1291
+ gmtModified: number;
1292
+ /**
1293
+ * 唯一标识
1294
+ */
1295
+ id: string;
1296
+ /**
1297
+ * 保存设备属性时的配置规则
1298
+ */
1299
+ type: string;
1300
+ /**
1301
+ * 属性值
1302
+ */
1303
+ value: string;
1304
+ }>;
1272
1305
  export interface ISaveDevProperty {
1273
1306
  /**
1274
1307
  * 设备 ID
@@ -1282,6 +1315,12 @@ export interface ISaveDevProperty {
1282
1315
  * 设备自定义属性列表,string 结构详见 @type{DeviceProperty}
1283
1316
  */
1284
1317
  propertyList: string;
1318
+ /**
1319
+ * 保存设备属性的配置规则,仅针对当前写入的属性有效,
1320
+ * 默认在设备重置和设备重置并清除数据时均会移除
1321
+ * 可以配置成 `remainAfterReset` 代表在设备重置时保留数据,仅在设备重置并清除数据时移除
1322
+ */
1323
+ type?: 'remainAfterReset' | string;
1285
1324
  }
1286
1325
  export interface DeviceProperty {
1287
1326
  /**
@@ -0,0 +1,3 @@
1
+ export { getCleaningRecords, deleteCleaningRecord } from './record';
2
+ export { getVoiceList } from './voice';
3
+ export { getMultipleMapFiles, getSweeperStorageConfig } from './map';
@@ -0,0 +1,3 @@
1
+ export { getCleaningRecords, deleteCleaningRecord } from './record';
2
+ export { getVoiceList } from './voice';
3
+ export { getMultipleMapFiles, getSweeperStorageConfig } from './map';
@@ -0,0 +1,3 @@
1
+ declare const getMultipleMapFiles: typeof ty.getMultipleMapFiles;
2
+ declare const getSweeperStorageConfig: typeof ty.getSweeperStorageConfig;
3
+ export { getMultipleMapFiles, getSweeperStorageConfig };
@@ -0,0 +1,4 @@
1
+ import { factory } from '../../utils';
2
+ const getMultipleMapFiles = factory('getMultipleMapFiles');
3
+ const getSweeperStorageConfig = factory('getSweeperStorageConfig');
4
+ export { getMultipleMapFiles, getSweeperStorageConfig };
@@ -0,0 +1,3 @@
1
+ declare const getCleaningRecords: typeof ty.getCleaningRecords;
2
+ declare const deleteCleaningRecord: typeof ty.deleteCleaningRecord;
3
+ export { getCleaningRecords, deleteCleaningRecord };
@@ -0,0 +1,4 @@
1
+ import { factory } from '../../utils';
2
+ const getCleaningRecords = factory('getCleaningRecords');
3
+ const deleteCleaningRecord = factory('deleteCleaningRecord');
4
+ export { getCleaningRecords, deleteCleaningRecord };
@@ -0,0 +1,2 @@
1
+ declare const getVoiceList: typeof ty.getVoiceList;
2
+ export { getVoiceList };
@@ -0,0 +1,3 @@
1
+ import { factory } from '../../utils';
2
+ const getVoiceList = factory('getVoiceList');
3
+ export { getVoiceList };
@@ -5,6 +5,7 @@ const _excluded = ["foodList"],
5
5
  _excluded3 = ["foodList"],
6
6
  _excluded4 = ["foodList"],
7
7
  _excluded5 = ["foodList"];
8
+ import "core-js/modules/es.json.stringify.js";
8
9
  // #region 获取菜篮子开关
9
10
 
10
11
  import { THING } from '../../constants';
@@ -3,6 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  const _excluded = ["query"],
4
4
  _excluded2 = ["menuCustom"],
5
5
  _excluded3 = ["menuCustom"];
6
+ import "core-js/modules/es.json.stringify.js";
6
7
  import { THING } from '../../constants';
7
8
  import requestCloud from '../../requestCloud';
8
9
  // #region 自定义食谱列表
@@ -2,6 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  const _excluded = ["query"],
4
4
  _excluded2 = ["like"];
5
+ import "core-js/modules/es.json.stringify.js";
5
6
  import { THING } from '../../constants';
6
7
  import requestCloud from '../../requestCloud';
7
8
  // #region 食谱列表
@@ -1,6 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  const _excluded = ["query"];
4
+ import "core-js/modules/es.json.stringify.js";
4
5
  import { THING } from '../../constants';
5
6
  import requestCloud from '../../requestCloud';
6
7
 
@@ -2,6 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  const _excluded = ["scoreInfo"],
4
4
  _excluded2 = ["query"];
5
+ import "core-js/modules/es.json.stringify.js";
5
6
  import { THING } from '../../constants';
6
7
  import requestCloud from '../../requestCloud';
7
8
  // #region 用户添加评分
@@ -1,6 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  const _excluded = ["query"];
4
+ import "core-js/modules/es.json.stringify.js";
4
5
  import { THING } from '../../constants';
5
6
  import requestCloud from '../../requestCloud';
6
7
  // #region 获取食谱收藏列表
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.regexp.exec.js";
1
2
  export default function getBoundingClientRect(ref) {
2
3
  return new Promise(resolve => {
3
4
  ref.boundingClientRect(rect => {
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.regexp.exec.js";
1
2
  export default function getBoundingClientRect(ref) {
2
3
  return new Promise(resolve => {
3
4
  ref.boundingClientRect(rect => {
@@ -4,43 +4,48 @@ const regionMap = {
4
4
  EU: 'euimagesd2h2yqnfpu4gl5.cdn5th.com',
5
5
  IN: 'inimagesd1jqokb9wptk2t.cdn5th.com',
6
6
  RU: 'euimagesd2h2yqnfpu4gl5.cdn5th.com',
7
- WE: 'd2h2yqnfpu4gl5.cdn5th.com',
8
- UE: 'usimagesd1448c85ulz2o4.cdn5th.com'
7
+ WE: 'weimages57vdxnr.cdn5th.com',
8
+ UE: 'ueimages58yny2.cdn5th.com'
9
+ };
10
+ let _regionCode;
11
+ let getInternalRegionCode = () => {
12
+ if (!_regionCode) {
13
+ ty.getAppInfo({
14
+ success(res) {
15
+ _regionCode = res.regionCode;
16
+ }
17
+ });
18
+ }
19
+ return 'EU';
9
20
  };
10
- let regionCode = 'EU';
11
21
  export function getRegionCode() {
12
22
  return new Promise((resolve, reject) => {
13
23
  ty.getAppInfo({
14
- success: function (res) {
24
+ success(res) {
25
+ _regionCode = res.regionCode;
15
26
  resolve(res.regionCode);
16
27
  },
17
- fail: function (err) {
28
+ fail(err) {
18
29
  reject(err);
19
30
  }
20
31
  });
21
32
  });
22
33
  }
23
- ty.getAppInfo({
24
- success: function (res) {
25
- regionCode = res.regionCode;
26
- }
27
- });
28
34
  export default function getCdnUrl(path, cdnMap, region) {
29
35
  if (!cdnMap) {
30
- console.warn('请传入cdnMap');
36
+ console.warn('Please pass in cdnMap');
31
37
  return path;
32
38
  }
33
39
  const cdnShortPath = cdnMap[path];
34
40
  if (!cdnShortPath) {
35
- console.warn('[App] cdn "' + path + '" is not exist.');
41
+ console.warn("[App] cdn \"".concat(path, "\" is not exist."));
36
42
  return path;
37
43
  }
38
- const cdnPath = 'https://' + regionMap[region || regionCode] + '/' + cdnShortPath;
39
- return cdnPath;
44
+ return "https://".concat(regionMap[region || getInternalRegionCode()], "/").concat(cdnShortPath);
40
45
  }
41
46
  export async function getCdnUrlAsync(path, cdnMap, region) {
42
47
  if (!cdnMap) {
43
- console.warn('请传入cdnMap');
48
+ console.warn('Please pass in cdnMap');
44
49
  return path;
45
50
  }
46
51
  let _regionCode = 'EU';
@@ -55,9 +60,8 @@ export async function getCdnUrlAsync(path, cdnMap, region) {
55
60
  }
56
61
  const cdnShortPath = cdnMap[path];
57
62
  if (!cdnShortPath) {
58
- console.warn('[App] cdn "' + path + '" is not exist.');
63
+ console.warn("[App] cdn \"".concat(path, "\" is not exist."));
59
64
  return path;
60
65
  }
61
- const cdnPath = 'https://' + regionMap[_regionCode] + '/' + cdnShortPath;
62
- return cdnPath;
66
+ return "https://".concat(regionMap[_regionCode], "/").concat(cdnShortPath);
63
67
  }
@@ -1,9 +1,8 @@
1
- /// <reference path="../../@types/api.d.ts" />
2
1
  declare const _default: (arg?: {
3
- animation?: boolean | undefined;
2
+ animation?: boolean;
4
3
  } & {
5
- success?: ((S?: any) => void) | undefined;
6
- fail?: ((F?: any) => void) | undefined;
7
- complete?: ((C?: any) => void) | undefined;
4
+ success?: (S?: any) => void;
5
+ fail?: (F?: any) => void;
6
+ complete?: (C?: any) => void;
8
7
  } & import("../core").PromisifyArgs<any, any>) => Promise<any>;
9
8
  export default _default;
package/lib/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference path="../@types/api.d.ts" />
2
1
  export * from './constants';
3
2
  export * from './all-kits';
4
3
  export * from './lifecycles';
@@ -1,3 +1,2 @@
1
- /// <reference path="../../@types/api.d.ts" />
2
1
  declare const _default: typeof ty.navigateBack;
3
2
  export default _default;