@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.
Files changed (145) hide show
  1. package/@types/BaseKit.d.ts +246 -126
  2. package/@types/BizKit.d.ts +1 -1
  3. package/@types/MapKit.d.ts +237 -1
  4. package/@types/MiniKit.d.ts +1 -1
  5. package/@types/OutdoorKit.d.ts +232 -0
  6. package/@types/P2PKit.d.ts +24 -2
  7. package/@types/all-kits.d.ts +1 -0
  8. package/@types/api-extend.d.ts +8 -2
  9. package/@types/index.d.ts +87 -0
  10. package/lib/{BaseKit-3.3.10.d.ts → BaseKit-3.11.0.d.ts} +1 -0
  11. package/lib/{BaseKit-3.3.10.js → BaseKit-3.11.0.js} +6 -2
  12. package/lib/BizKit-3.2.7.js +2 -1
  13. package/lib/DeviceKit-3.3.1.js +2 -1
  14. package/lib/HomeKit-3.1.4.js +2 -1
  15. package/lib/{MapKit-3.0.7.d.ts → MapKit-3.4.13.d.ts} +5 -0
  16. package/lib/{MapKit-3.0.7.js → MapKit-3.4.13.js} +19 -1
  17. package/lib/MiniKit-3.1.0.js +3 -2
  18. package/lib/OutdoorKit-1.0.4.d.ts +14 -0
  19. package/lib/OutdoorKit-1.0.4.js +39 -0
  20. package/lib/P2PKit-2.0.3.d.ts +1 -0
  21. package/lib/P2PKit-2.0.3.js +5 -1
  22. package/lib/PlayNetKit-1.1.3.d.ts +24 -25
  23. package/lib/PlayNetKit-1.1.3.js +2 -1
  24. package/lib/all-kits.d.ts +3 -2
  25. package/lib/all-kits.js +3 -2
  26. package/lib/cloud/alarm.js +2 -2
  27. package/lib/cloud/core.js +1 -1
  28. package/lib/cloud/device.d.ts +25 -1
  29. package/lib/cloud/device.js +20 -6
  30. package/lib/cloud/doorlock/README.md +62 -0
  31. package/lib/cloud/doorlock/auth.d.ts +235 -0
  32. package/lib/cloud/doorlock/auth.js +223 -0
  33. package/lib/cloud/doorlock/auth.md +323 -0
  34. package/lib/cloud/doorlock/device.d.ts +137 -0
  35. package/lib/cloud/doorlock/device.js +187 -0
  36. package/lib/cloud/doorlock/device.md +265 -0
  37. package/lib/cloud/doorlock/index.d.ts +10 -0
  38. package/lib/cloud/doorlock/index.js +20 -0
  39. package/lib/cloud/doorlock/log.d.ts +113 -0
  40. package/lib/cloud/doorlock/log.js +53 -0
  41. package/lib/cloud/doorlock/log.md +153 -0
  42. package/lib/cloud/doorlock/member-opmode.d.ts +121 -0
  43. package/lib/cloud/doorlock/member-opmode.js +104 -0
  44. package/lib/cloud/doorlock/member-opmode.md +279 -0
  45. package/lib/cloud/doorlock/member.d.ts +110 -0
  46. package/lib/cloud/doorlock/member.js +72 -0
  47. package/lib/cloud/doorlock/member.md +276 -0
  48. package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
  49. package/lib/cloud/doorlock/offline-pwd.js +67 -0
  50. package/lib/cloud/doorlock/offline-pwd.md +155 -0
  51. package/lib/cloud/doorlock/old.d.ts +36 -0
  52. package/lib/cloud/doorlock/old.js +102 -0
  53. package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
  54. package/lib/cloud/doorlock/temp-pwd.js +193 -0
  55. package/lib/cloud/doorlock/temp-pwd.md +362 -0
  56. package/lib/cloud/doorlock/unlock-method.d.ts +62 -0
  57. package/lib/cloud/doorlock/unlock-method.js +85 -0
  58. package/lib/cloud/doorlock/unlock-method.md +121 -0
  59. package/lib/cloud/doorlock/unlock.d.ts +89 -0
  60. package/lib/cloud/doorlock/unlock.js +76 -0
  61. package/lib/cloud/doorlock/unlock.md +222 -0
  62. package/lib/cloud/index.d.ts +4 -0
  63. package/lib/cloud/index.js +10 -1
  64. package/lib/cloud/interface.d.ts +39 -2
  65. package/lib/cloud/linkage.d.ts +8 -5
  66. package/lib/cloud/linkage.js +38 -17
  67. package/lib/cloud/outdoor.d.ts +15 -0
  68. package/lib/cloud/outdoor.js +25 -0
  69. package/lib/cloud/recipe/README.md +36 -0
  70. package/lib/cloud/recipe/basket.d.ts +220 -0
  71. package/lib/cloud/recipe/basket.js +328 -0
  72. package/lib/cloud/recipe/basket.md +431 -0
  73. package/lib/cloud/recipe/category-list.d.ts +71 -0
  74. package/lib/cloud/recipe/category-list.js +65 -0
  75. package/lib/cloud/recipe/category-list.md +132 -0
  76. package/lib/cloud/recipe/custom.d.ts +177 -0
  77. package/lib/cloud/recipe/custom.js +171 -0
  78. package/lib/cloud/recipe/custom.md +265 -0
  79. package/lib/cloud/recipe/index.d.ts +8 -0
  80. package/lib/cloud/recipe/index.js +8 -0
  81. package/lib/cloud/recipe/menu.d.ts +170 -0
  82. package/lib/cloud/recipe/menu.js +76 -0
  83. package/lib/cloud/recipe/menu.md +276 -0
  84. package/lib/cloud/recipe/query.d.ts +87 -0
  85. package/lib/cloud/recipe/query.js +101 -0
  86. package/lib/cloud/recipe/query.md +112 -0
  87. package/lib/cloud/recipe/record.d.ts +54 -0
  88. package/lib/cloud/recipe/record.js +87 -0
  89. package/lib/cloud/recipe/record.md +115 -0
  90. package/lib/cloud/recipe/score.d.ts +69 -0
  91. package/lib/cloud/recipe/score.js +106 -0
  92. package/lib/cloud/recipe/score.md +112 -0
  93. package/lib/cloud/recipe/star.d.ts +131 -0
  94. package/lib/cloud/recipe/star.js +151 -0
  95. package/lib/cloud/recipe/star.md +196 -0
  96. package/lib/cloud/recipe/types.d.ts +7 -0
  97. package/lib/cloud/recipe/types.js +0 -0
  98. package/lib/cloud/remoteGroup.d.ts +10 -0
  99. package/lib/cloud/remoteGroup.js +31 -0
  100. package/lib/cloud/statistic.js +9 -9
  101. package/lib/cloud/timer.js +14 -14
  102. package/lib/constants.js +1 -1
  103. package/lib/errorCode.d.ts +4 -0
  104. package/lib/errorCode.js +3 -0
  105. package/lib/getCdnUrl/index.d.ts +2 -2
  106. package/lib/getCdnUrl/index.js +1 -2
  107. package/lib/getCdnUrl/index.wechat.d.ts +2 -2
  108. package/lib/getCdnUrl/index.wechat.js +1 -2
  109. package/lib/getElementById/index.thing.js +1 -1
  110. package/lib/getElementById/index.wechat.js +1 -1
  111. package/lib/index.d.ts +1 -0
  112. package/lib/index.js +1 -0
  113. package/lib/nativeRouters/common.d.ts +15 -0
  114. package/lib/nativeRouters/common.js +38 -0
  115. package/lib/nativeRouters/device.d.ts +59 -0
  116. package/lib/nativeRouters/device.js +69 -0
  117. package/lib/nativeRouters/gw.d.ts +23 -0
  118. package/lib/nativeRouters/gw.js +27 -0
  119. package/lib/nativeRouters/index.d.ts +6 -1
  120. package/lib/nativeRouters/index.js +6 -1
  121. package/lib/nativeRouters/ipc.d.ts +30 -0
  122. package/lib/nativeRouters/ipc.js +44 -0
  123. package/lib/nativeRouters/outdoors.d.ts +47 -0
  124. package/lib/nativeRouters/outdoors.js +41 -0
  125. package/lib/nativeRouters/remoteGroup.d.ts +22 -0
  126. package/lib/nativeRouters/remoteGroup.js +11 -0
  127. package/lib/nativeRouters/root.d.ts +41 -0
  128. package/lib/nativeRouters/root.js +53 -0
  129. package/lib/openGroupCreate/index.js +3 -3
  130. package/lib/panel/i18n/index.d.ts +7 -6
  131. package/lib/panel/i18n/index.js +39 -23
  132. package/lib/panel/i18n/index.wechat.js +13 -12
  133. package/lib/panel/normalizeNetwork.js +1 -1
  134. package/lib/panel/publishDps.js +1 -1
  135. package/lib/redirectTo/index.js +1 -0
  136. package/lib/utils.d.ts +5 -2
  137. package/lib/utils.js +46 -20
  138. package/lib/utils.wechat.d.ts +3 -0
  139. package/lib/utils.wechat.js +22 -6
  140. package/lib/viewAPI.d.ts +1 -0
  141. package/lib/viewAPI.js +4 -3
  142. package/package.json +8 -7
  143. package/@types/PlayNetKit.d.ts +0 -444
  144. package/lib/nativeRouters/scene.d.ts +0 -34
  145. package/lib/nativeRouters/scene.js +0 -60
@@ -0,0 +1,131 @@
1
+ /**
2
+ * GetRecipeCollectionListQuery - 获取食谱收藏列表查询条件
3
+ */
4
+ type GetRecipeCollectionListQuery = {
5
+ pageNo?: number;
6
+ pageSize?: number;
7
+ };
8
+ /**
9
+ * GetRecipeCollectionListParams - 获取食谱收藏列表请求参数
10
+ */
11
+ type GetRecipeCollectionListParams = {
12
+ query: GetRecipeCollectionListQuery;
13
+ devId: string;
14
+ };
15
+ /**
16
+ * RecipeInfo - 食谱信息
17
+ */
18
+ type RecipeInfo = {
19
+ id: number;
20
+ mainImg: string;
21
+ lang: number;
22
+ langDesc: string;
23
+ desc: string;
24
+ cookType: number;
25
+ extInfo: string;
26
+ sourceType: number;
27
+ isMainShow: number;
28
+ isShowControl: number;
29
+ isControl: number;
30
+ name: string;
31
+ easyLevel: string;
32
+ easyLevelDesc: string;
33
+ taste: string;
34
+ tasteDesc: string;
35
+ foodType: string;
36
+ foodTypeDesc: string;
37
+ gmtCreate: number;
38
+ gmtModified: number;
39
+ };
40
+ /**
41
+ * GetRecipeCollectionListResult - 获取食谱收藏列表返回结果
42
+ */
43
+ type GetRecipeCollectionListResult = {
44
+ totalCount: number;
45
+ pageNo: number;
46
+ pageSize: number;
47
+ hasNext: boolean;
48
+ data: RecipeInfo[];
49
+ };
50
+ /**
51
+ * GetRecipeCollectionListResponse - 获取食谱收藏列表响应
52
+ */
53
+ type GetRecipeCollectionListResponse = GetRecipeCollectionListResult;
54
+ /**
55
+ * 获取食谱收藏列表
56
+ * @param {GetRecipeCollectionListParams} params - 获取食谱收藏列表请求参数
57
+ * @returns {Promise<GetRecipeCollectionListResponse>} - 获取食谱收藏列表响应的 Promise
58
+ */
59
+ export declare const getRecipeCollectionList: (params: GetRecipeCollectionListParams) => Promise<GetRecipeCollectionListResponse>;
60
+ /**
61
+ * AddRecipeToFavoritesParams - 添加食谱收藏参数
62
+ */
63
+ type AddRecipeToFavoritesParams = {
64
+ menuId: number;
65
+ devId: string;
66
+ };
67
+ /**
68
+ * AddRecipeToFavoritesResponse - 添加食谱收藏响应
69
+ */
70
+ type AddRecipeToFavoritesResponse = boolean;
71
+ /**
72
+ * 添加食谱收藏
73
+ * @param {AddRecipeToFavoritesParams} params - 添加食谱收藏参数
74
+ * @returns {Promise<AddRecipeToFavoritesResponse>} - 添加食谱收藏结果的 Promise
75
+ */
76
+ export declare const addRecipeToFavorites: (params: AddRecipeToFavoritesParams) => Promise<AddRecipeToFavoritesResponse>;
77
+ /**
78
+ * RemoveRecipeFromFavoritesParams - 取消食谱收藏参数
79
+ */
80
+ type RemoveRecipeFromFavoritesParams = {
81
+ menuId: number;
82
+ devId: string;
83
+ };
84
+ /**
85
+ * RemoveRecipeFromFavoritesResponse - 取消食谱收藏响应
86
+ */
87
+ type RemoveRecipeFromFavoritesResponse = boolean;
88
+ /**
89
+ * 取消食谱收藏
90
+ * @param {RemoveRecipeFromFavoritesParams} params - 取消食谱收藏参数
91
+ * @returns {Promise<RemoveRecipeFromFavoritesResponse>} - 取消食谱收藏结果的 Promise
92
+ */
93
+ export declare const removeRecipeFromFavorites: (params: RemoveRecipeFromFavoritesParams) => Promise<RemoveRecipeFromFavoritesResponse>;
94
+ /**
95
+ * CheckRecipeIsStarredParams - 查询食谱是否收藏参数
96
+ */
97
+ type CheckRecipeIsStarredParams = {
98
+ menuId: number;
99
+ devId: string;
100
+ };
101
+ /**
102
+ * CheckRecipeIsStarredResponse - 查询食谱是否收藏响应
103
+ */
104
+ type CheckRecipeIsStarredResponse = {
105
+ isStar: boolean;
106
+ };
107
+ /**
108
+ * 查询食谱是否收藏
109
+ * @param {CheckRecipeIsStarredParams} params - 查询食谱是否收藏参数
110
+ * @returns {Promise<CheckRecipeIsStarredResponse>} - 查询食谱是否收藏结果的 Promise
111
+ */
112
+ export declare const checkRecipeIsStarred: (params: CheckRecipeIsStarredParams) => Promise<CheckRecipeIsStarredResponse>;
113
+ /**
114
+ * GetRecipeStarCountParams - 查询食谱收藏数量参数
115
+ */
116
+ type GetRecipeStarCountParams = {
117
+ devId: string;
118
+ };
119
+ /**
120
+ * GetRecipeStarCountResponse - 查询食谱收藏数量响应
121
+ */
122
+ type GetRecipeStarCountResponse = {
123
+ count: number;
124
+ };
125
+ /**
126
+ * 查询用户已收藏的食谱数量
127
+ * @param {GetRecipeStarCountParams} params - 查询食谱收藏数量参数
128
+ * @returns {Promise<GetRecipeStarCountResponse>} - 查询食谱收藏数量结果的 Promise
129
+ */
130
+ export declare const getRecipeStarCount: (params: GetRecipeStarCountParams) => Promise<GetRecipeStarCountResponse>;
131
+ export {};
@@ -0,0 +1,151 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ const _excluded = ["query"];
4
+ import { THING } from '../../constants';
5
+ import requestCloud from '../../requestCloud';
6
+ // #region 获取食谱收藏列表
7
+
8
+ /**
9
+ * GetRecipeCollectionListQuery - 获取食谱收藏列表查询条件
10
+ */
11
+
12
+ /**
13
+ * GetRecipeCollectionListParams - 获取食谱收藏列表请求参数
14
+ */
15
+
16
+ /**
17
+ * RecipeInfo - 食谱信息
18
+ */
19
+
20
+ /**
21
+ * GetRecipeCollectionListResult - 获取食谱收藏列表返回结果
22
+ */
23
+
24
+ /**
25
+ * GetRecipeCollectionListResponse - 获取食谱收藏列表响应
26
+ */
27
+
28
+ /**
29
+ * 获取食谱收藏列表
30
+ * @param {GetRecipeCollectionListParams} params - 获取食谱收藏列表请求参数
31
+ * @returns {Promise<GetRecipeCollectionListResponse>} - 获取食谱收藏列表响应的 Promise
32
+ */
33
+ export const getRecipeCollectionList = params => {
34
+ const {
35
+ query
36
+ } = params,
37
+ rest = _objectWithoutProperties(params, _excluded);
38
+ return requestCloud({
39
+ api: "".concat(THING, ".m.menu.star.list"),
40
+ version: '2.0',
41
+ data: _objectSpread({
42
+ queryJson: JSON.stringify(query)
43
+ }, rest)
44
+ });
45
+ };
46
+
47
+ // #endregion
48
+
49
+ // #region 添加食谱收藏
50
+
51
+ /**
52
+ * AddRecipeToFavoritesParams - 添加食谱收藏参数
53
+ */
54
+
55
+ /**
56
+ * AddRecipeToFavoritesResponse - 添加食谱收藏响应
57
+ */
58
+
59
+ // 返回结果,是否添加成功
60
+
61
+ /**
62
+ * 添加食谱收藏
63
+ * @param {AddRecipeToFavoritesParams} params - 添加食谱收藏参数
64
+ * @returns {Promise<AddRecipeToFavoritesResponse>} - 添加食谱收藏结果的 Promise
65
+ */
66
+ export const addRecipeToFavorites = params => {
67
+ return requestCloud({
68
+ api: "".concat(THING, ".m.menu.star.add"),
69
+ version: '1.0',
70
+ data: params
71
+ });
72
+ };
73
+
74
+ // #endregion
75
+
76
+ // #region 取消食谱收藏
77
+
78
+ /**
79
+ * RemoveRecipeFromFavoritesParams - 取消食谱收藏参数
80
+ */
81
+
82
+ /**
83
+ * RemoveRecipeFromFavoritesResponse - 取消食谱收藏响应
84
+ */
85
+
86
+ // 返回结果,是否取消成功
87
+
88
+ /**
89
+ * 取消食谱收藏
90
+ * @param {RemoveRecipeFromFavoritesParams} params - 取消食谱收藏参数
91
+ * @returns {Promise<RemoveRecipeFromFavoritesResponse>} - 取消食谱收藏结果的 Promise
92
+ */
93
+ export const removeRecipeFromFavorites = params => {
94
+ return requestCloud({
95
+ api: "".concat(THING, ".m.menu.star.delete"),
96
+ version: '1.0',
97
+ data: params
98
+ });
99
+ };
100
+
101
+ // #endregion
102
+
103
+ // #region 食谱是否收藏
104
+
105
+ /**
106
+ * CheckRecipeIsStarredParams - 查询食谱是否收藏参数
107
+ */
108
+
109
+ /**
110
+ * CheckRecipeIsStarredResponse - 查询食谱是否收藏响应
111
+ */
112
+
113
+ /**
114
+ * 查询食谱是否收藏
115
+ * @param {CheckRecipeIsStarredParams} params - 查询食谱是否收藏参数
116
+ * @returns {Promise<CheckRecipeIsStarredResponse>} - 查询食谱是否收藏结果的 Promise
117
+ */
118
+ export const checkRecipeIsStarred = params => {
119
+ return requestCloud({
120
+ api: "".concat(THING, ".m.menu.star.check"),
121
+ version: '1.0',
122
+ data: params
123
+ });
124
+ };
125
+
126
+ // #endregion
127
+
128
+ // #region 食谱收藏数量
129
+
130
+ /**
131
+ * GetRecipeStarCountParams - 查询食谱收藏数量参数
132
+ */
133
+
134
+ /**
135
+ * GetRecipeStarCountResponse - 查询食谱收藏数量响应
136
+ */
137
+
138
+ /**
139
+ * 查询用户已收藏的食谱数量
140
+ * @param {GetRecipeStarCountParams} params - 查询食谱收藏数量参数
141
+ * @returns {Promise<GetRecipeStarCountResponse>} - 查询食谱收藏数量结果的 Promise
142
+ */
143
+ export const getRecipeStarCount = params => {
144
+ return requestCloud({
145
+ api: "".concat(THING, ".m.menu.star.count"),
146
+ version: '1.0',
147
+ data: params
148
+ });
149
+ };
150
+
151
+ // #endregion
@@ -0,0 +1,196 @@
1
+ ## getRecipeCollectionList
2
+
3
+ 获取食谱收藏列表。
4
+
5
+ ### 引入
6
+
7
+ > @ray-js/ray^1.5.0 以上版本可使用
8
+
9
+ ```js
10
+ import { getRecipeCollectionList } from '@ray-js/ray'
11
+ ```
12
+
13
+ **参数**
14
+
15
+ **GetRecipeCollectionListParams params**
16
+
17
+ 封装了获取食谱收藏列表的查询条件和设备 ID。
18
+
19
+ **参数属性 GetRecipeCollectionListParams**
20
+
21
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
22
+ | ----- | ------------------------------ | ------ | ---- | -------- |
23
+ | query | `GetRecipeCollectionListQuery` | | 是 | 查询条件 |
24
+ | devId | `string` | | 是 | 设备 ID |
25
+
26
+ **函数定义示例**
27
+
28
+ ```typescript
29
+ /**
30
+ * 获取食谱收藏列表
31
+ * @param {GetRecipeCollectionListParams} params - 获取食谱收藏列表请求参数
32
+ * @returns {Promise<GetRecipeCollectionListResponse>} - 获取食谱收藏列表响应的 Promise 对象
33
+ */
34
+ export const getRecipeCollectionList: (
35
+ params: GetRecipeCollectionListParams
36
+ ) => Promise<GetRecipeCollectionListResponse>
37
+ ```
38
+
39
+ ---
40
+
41
+ ## addRecipeToFavorites
42
+
43
+ 添加食谱收藏。
44
+
45
+ ### 引入
46
+
47
+ > @ray-js/ray^1.5.0 以上版本可使用
48
+
49
+ ```js
50
+ import { addRecipeToFavorites } from '@ray-js/ray'
51
+ ```
52
+
53
+ **参数**
54
+
55
+ **AddRecipeToFavoritesParams params**
56
+
57
+ 封装了食谱 ID 和设备 ID。
58
+
59
+ **参数属性 AddRecipeToFavoritesParams**
60
+
61
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
62
+ | ------ | -------- | ------ | ---- | ------- |
63
+ | menuId | `number` | | 是 | 食谱 ID |
64
+ | devId | `string` | | 是 | 设备 ID |
65
+
66
+ **函数定义示例**
67
+
68
+ ```typescript
69
+ /**
70
+ * 添加食谱收藏
71
+ * @param {AddRecipeToFavoritesParams} params - 添加食谱收藏参数
72
+ * @returns {Promise<AddRecipeToFavoritesResponse>} - 添加食谱收藏结果的 Promise 对象
73
+ */
74
+ export const addRecipeToFavorites: (
75
+ params: AddRecipeToFavoritesParams
76
+ ) => Promise<AddRecipeToFavoritesResponse>
77
+ ```
78
+
79
+ ---
80
+
81
+ ## removeRecipeFromFavorites
82
+
83
+ 取消食谱收藏。
84
+
85
+ ### 引入
86
+
87
+ > @ray-js/ray^1.5.0 以上版本可使用
88
+
89
+ ```js
90
+ import { removeRecipeFromFavorites } from '@ray-js/ray'
91
+ ```
92
+
93
+ **参数**
94
+
95
+ **RemoveRecipeFromFavoritesParams params**
96
+
97
+ 封装了食谱 ID 和设备 ID。
98
+
99
+ **参数属性 RemoveRecipeFromFavoritesParams**
100
+
101
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
102
+ | ------ | -------- | ------ | ---- | ------- |
103
+ | menuId | `number` | | 是 | 食谱 ID |
104
+ | devId | `string` | | 是 | 设备 ID |
105
+
106
+ **函数定义示例**
107
+
108
+ ```typescript
109
+ /**
110
+ * 取消食谱收藏
111
+ * @param {RemoveRecipeFromFavoritesParams} params - 取消食谱收藏参数
112
+ * @returns {Promise<RemoveRecipeFromFavoritesResponse>} - 取消食谱收藏结果的 Promise 对象
113
+ */
114
+ export const removeRecipeFromFavorites: (
115
+ params: RemoveRecipeFromFavoritesParams
116
+ ) => Promise<RemoveRecipeFromFavoritesResponse>
117
+ ```
118
+
119
+ ---
120
+
121
+ ## checkRecipeIsStarred
122
+
123
+ 查询食谱是否收藏。
124
+
125
+ ### 引入
126
+
127
+ > @ray-js/ray^1.5.0 以上版本可使用
128
+
129
+ ```js
130
+ import { checkRecipeIsStarred } from '@ray-js/ray'
131
+ ```
132
+
133
+ **参数**
134
+
135
+ **CheckRecipeIsStarredParams params**
136
+
137
+ 封装了食谱 ID 和设备 ID。
138
+
139
+ **参数属性 CheckRecipeIsStarredParams**
140
+
141
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
142
+ | ------ | -------- | ------ | ---- | ------- |
143
+ | menuId | `number` | | 是 | 食谱 ID |
144
+ | devId | `string` | | 是 | 设备 ID |
145
+
146
+ **函数定义示例**
147
+
148
+ ```typescript
149
+ /**
150
+ * 查询食谱是否收藏
151
+ * @param {CheckRecipeIsStarredParams} params - 查询食谱是否收藏参数
152
+ * @returns {Promise<CheckRecipeIsStarredResponse>} - 查询食谱是否收藏结果的 Promise 对象
153
+ */
154
+ export const checkRecipeIsStarred: (
155
+ params: CheckRecipeIsStarredParams
156
+ ) => Promise<CheckRecipeIsStarredResponse>
157
+ ```
158
+
159
+ ---
160
+
161
+ ## getRecipeStarCount
162
+
163
+ 查询用户已收藏的食谱数量。
164
+
165
+ ### 引入
166
+
167
+ > @ray-js/ray^1.5.0 以上版本可使用
168
+
169
+ ```js
170
+ import { getRecipeStarCount } from '@ray-js/ray'
171
+ ```
172
+
173
+ **参数**
174
+
175
+ **GetRecipeStarCountParams params**
176
+
177
+ 封装了设备 ID。
178
+
179
+ **参数属性 GetRecipeStarCountParams**
180
+
181
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
182
+ | ----- | -------- | ------ | ---- | ------- |
183
+ | devId | `string` | | 是 | 设备 ID |
184
+
185
+ **函数定义示例**
186
+
187
+ ```typescript
188
+ /**
189
+ * 查询用户已收藏的食谱数量
190
+ * @param {GetRecipeStarCountParams} params - 查询食谱收藏数量参数
191
+ * @returns {Promise<GetRecipeStarCountResponse>} - 查询食谱收藏数量结果的 Promise 对象
192
+ */
193
+ export const getRecipeStarCount: (
194
+ params: GetRecipeStarCountParams
195
+ ) => Promise<GetRecipeStarCountResponse>
196
+ ```
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 多语言信息
3
+ */
4
+ declare type LangInfo = {
5
+ lang: string;
6
+ name: string;
7
+ };
File without changes
@@ -0,0 +1,10 @@
1
+ import { IGetZigbeeLocalGroupDeviceList, IGetZigbeeLocalGroupRelation } from './interface';
2
+ /**
3
+ * 获取 Zigbee 遥控器群组 localId 列表
4
+ */
5
+ declare const getZigbeeLocalGroupRelation: (params: IGetZigbeeLocalGroupRelation) => Promise<string>;
6
+ /**
7
+ * 获取可以加入 Zigbee 遥控器群组的设备列表
8
+ */
9
+ declare const getZigbeeLocalGroupDeviceList: (params: IGetZigbeeLocalGroupDeviceList) => Promise<string>;
10
+ export { getZigbeeLocalGroupRelation, getZigbeeLocalGroupDeviceList };
@@ -0,0 +1,31 @@
1
+ // 遥控器群组接口
2
+ import { requestCloud } from '../';
3
+ import { THING } from '../constants';
4
+ /**
5
+ * 获取 Zigbee 遥控器群组 localId 列表
6
+ */
7
+ const getZigbeeLocalGroupRelation = params => {
8
+ return requestCloud({
9
+ api: "".concat(THING, ".p.remote.local.relation.get"),
10
+ version: '1.0',
11
+ data: {
12
+ devId: params.devId,
13
+ type: 0
14
+ }
15
+ });
16
+ };
17
+
18
+ /**
19
+ * 获取可以加入 Zigbee 遥控器群组的设备列表
20
+ */
21
+ const getZigbeeLocalGroupDeviceList = params => {
22
+ return requestCloud({
23
+ api: "".concat(THING, ".m.device.group.dev.list"),
24
+ version: '1.0',
25
+ data: params,
26
+ extData: {
27
+ gid: params.homeId
28
+ }
29
+ });
30
+ };
31
+ export { getZigbeeLocalGroupRelation, getZigbeeLocalGroupDeviceList };
@@ -14,7 +14,7 @@ import { THING } from '../constants';
14
14
  */
15
15
  const getLogInSpecifiedTime = params => {
16
16
  return requestCloud({
17
- api: `${THING}.m.smart.operate.all.log`,
17
+ api: "".concat(THING, ".m.smart.operate.all.log"),
18
18
  version: '1.0',
19
19
  data: _objectSpread({}, params)
20
20
  });
@@ -62,7 +62,7 @@ const getLogUserAction = params => {
62
62
  */
63
63
  const getDpLogDays = params => {
64
64
  return requestCloud({
65
- api: `${THING}.m.dp.stat.days.list`,
65
+ api: "".concat(THING, ".m.dp.stat.days.list"),
66
66
  version: '1.0',
67
67
  data: _objectSpread({}, params)
68
68
  });
@@ -76,7 +76,7 @@ const getDpLogDays = params => {
76
76
  */
77
77
  const getDpResultByMonth = params => {
78
78
  return requestCloud({
79
- api: `${THING}.m.dp.stat.month.list`,
79
+ api: "".concat(THING, ".m.dp.stat.month.list"),
80
80
  version: '1.0',
81
81
  data: _objectSpread({}, params)
82
82
  });
@@ -93,7 +93,7 @@ const getDpResultByMonth = params => {
93
93
  */
94
94
  const getDpResultByHour = params => {
95
95
  return requestCloud({
96
- api: `${THING}.m.dp.rang.stat.hour.list`,
96
+ api: "".concat(THING, ".m.dp.rang.stat.hour.list"),
97
97
  version: '1.0',
98
98
  data: _objectSpread({}, params)
99
99
  });
@@ -111,7 +111,7 @@ const getDpResultByHour = params => {
111
111
  */
112
112
  const getDataWithSpecified = params => {
113
113
  return requestCloud({
114
- api: `${THING}.m.dp.rang.stat.day.list`,
114
+ api: "".concat(THING, ".m.dp.rang.stat.day.list"),
115
115
  version: '2.0',
116
116
  data: _objectSpread({}, params)
117
117
  });
@@ -127,7 +127,7 @@ const getDataWithSpecified = params => {
127
127
  */
128
128
  const getWeekWithSpecified = params => {
129
129
  return requestCloud({
130
- api: `${THING}.m.dp.rang.stat.week.list`,
130
+ api: "".concat(THING, ".m.dp.rang.stat.week.list"),
131
131
  version: '1.0',
132
132
  data: _objectSpread({}, params)
133
133
  });
@@ -145,7 +145,7 @@ const getWeekWithSpecified = params => {
145
145
  */
146
146
  const getMonthWithSpecified = params => {
147
147
  return requestCloud({
148
- api: `${THING}.m.dp.rang.stat.month.list`,
148
+ api: "".concat(THING, ".m.dp.rang.stat.month.list"),
149
149
  version: '2.0',
150
150
  data: _objectSpread({}, params)
151
151
  });
@@ -159,7 +159,7 @@ const getMonthWithSpecified = params => {
159
159
  */
160
160
  const getDpAllStatistResult = params => {
161
161
  return requestCloud({
162
- api: `${THING}.m.dp.stat.total`,
162
+ api: "".concat(THING, ".m.dp.stat.total"),
163
163
  version: '1.0',
164
164
  data: _objectSpread({}, params)
165
165
  });
@@ -179,7 +179,7 @@ const getDpAllStatistResult = params => {
179
179
  */
180
180
  const getMultiDpsAllResult = params => {
181
181
  return requestCloud({
182
- api: `${THING}.m.device.query.device.log`,
182
+ api: "".concat(THING, ".m.device.query.device.log"),
183
183
  version: '1.0',
184
184
  data: _objectSpread({}, params)
185
185
  });