@ray-js/api 1.6.20-alpha.0 → 1.6.21

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.
@@ -193,4 +193,47 @@ type OperateRecipeLikeResponse = boolean;
193
193
  * @returns {Promise<OperateRecipeLikeResponse>} - 食谱点赞响应 Promise
194
194
  */
195
195
  export declare const operateRecipeLike: (params: OperateRecipeLikeParams) => Promise<OperateRecipeLikeResponse>;
196
+ type GetRecipeListByDevIdParams = {
197
+ devId: string;
198
+ query: {
199
+ name?: string;
200
+ categoryIds?: number[];
201
+ cookTimeMin?: number;
202
+ cookTimeMax?: number;
203
+ isFoodChannel?: number;
204
+ orderType?: number;
205
+ pvWeight?: number;
206
+ starCountWeight?: number;
207
+ avgScoreWeight?: number;
208
+ pageNo: number;
209
+ pageSize: number;
210
+ };
211
+ };
212
+ /**
213
+ * RecipeListResponse - 仅查询当前设备所属产品组关联的⻝谱响应参数
214
+ */
215
+ type RecipeListByDevIdResponse = {
216
+ totalCount: number;
217
+ pageNo: number;
218
+ pageSize: number;
219
+ hasNext: boolean;
220
+ data: RecipeInfo[];
221
+ };
222
+ /**
223
+ * 1.6.21 新增 查询当前设备所属产品组关联的⻝谱(方太云食谱)
224
+ * @param {GetRecipeListByDevIdParams} query - 食谱列表查询条件
225
+ * @returns {Promise<RecipeListByDevIdResponse>} - 食谱列表响应的 Promise
226
+ */
227
+ export declare const getPanelRecipeList: (params: GetRecipeListByDevIdParams) => Promise<RecipeListByDevIdResponse>;
228
+ interface RecipeDetailByDevIdParams {
229
+ menuId: number;
230
+ devId: string;
231
+ }
232
+ type RecipeDetailByDevIdResponse = RecipeDetailResult;
233
+ /**
234
+ * 1.6.21 新增 获取食谱详情的函数(方太云食谱)
235
+ * @param params { menuId: number; devId: string; }
236
+ * @returns {Promise<RecipeDetailByDevIdResponse>}
237
+ */
238
+ export declare const getPanelRecipeDetail: (params: RecipeDetailByDevIdParams) => Promise<RecipeDetailByDevIdResponse>;
196
239
  export {};
@@ -69,7 +69,6 @@ export const getRecipeDetail = params => {
69
69
  return requestCloud({
70
70
  api: `${THING}.m.menu.get`,
71
71
  version: '1.0',
72
- // 假设使用 GET 方法
73
72
  data: params
74
73
  });
75
74
  };
@@ -101,4 +100,52 @@ export const operateRecipeLike = params => {
101
100
  });
102
101
  };
103
102
 
103
+ //#endregion
104
+
105
+ // #region 食谱列表 ha.recipe.panel.list 分⻚获取B端客户⻝谱信息,语⾔跟随⼿机当前系统语⾔。仅查询当前设备所属产品组关联的⻝谱。
106
+
107
+ /**
108
+ * RecipeListResponse - 仅查询当前设备所属产品组关联的⻝谱响应参数
109
+ */
110
+
111
+ /**
112
+ * 1.6.21 新增 查询当前设备所属产品组关联的⻝谱(方太云食谱)
113
+ * @param {GetRecipeListByDevIdParams} query - 食谱列表查询条件
114
+ * @returns {Promise<RecipeListByDevIdResponse>} - 食谱列表响应的 Promise
115
+ */
116
+ export const getPanelRecipeList = params => {
117
+ const {
118
+ devId,
119
+ query
120
+ } = params;
121
+ return requestCloud({
122
+ api: `m.ha.recipe.panel.list`,
123
+ version: '1.0',
124
+ data: {
125
+ devId,
126
+ queryJson: JSON.stringify(query)
127
+ }
128
+ });
129
+ };
130
+
131
+ //#endregion
132
+
133
+ // #region 获取⻝谱详情,语⾔跟随⼿机当前系统语⾔。设备所属的产品ID必须要和⻝谱归属于同⼀个IoT账号下。
134
+ // 请求参数接口
135
+
136
+ // 响应参数接口
137
+
138
+ /**
139
+ * 1.6.21 新增 获取食谱详情的函数(方太云食谱)
140
+ * @param params { menuId: number; devId: string; }
141
+ * @returns {Promise<RecipeDetailByDevIdResponse>}
142
+ */
143
+ export const getPanelRecipeDetail = params => {
144
+ return requestCloud({
145
+ api: `m.ha.recipe.panel.get`,
146
+ version: '1.0',
147
+ data: params
148
+ });
149
+ };
150
+
104
151
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.6.20-alpha.0",
3
+ "version": "1.6.21",
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.6.20-alpha.0",
33
- "@ray-js/router": "1.6.20-alpha.0",
32
+ "@ray-js/framework": "1.6.21",
33
+ "@ray-js/router": "1.6.21",
34
34
  "@ray-js/wechat": "^0.2.19",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.6.20-alpha.0",
39
+ "@ray-js/cli": "1.6.21",
40
40
  "art-template": "^4.13.2",
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": "6111376e4f7189596d01d840c06e43284eb74d2e"
49
+ "gitHead": "d18c6e026c4fef74612a1ecaf91a928f6bf2830a"
50
50
  }