@ray-js/api 1.5.4 → 1.6.0-beta.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.
- package/lib/cloud/recipe/custom.d.ts +9 -0
- package/lib/cloud/recipe/menu.d.ts +26 -0
- package/lib/cloud/recipe/menu.js +29 -1
- package/package.json +5 -5
- package/lib/cloud/recipe/basket.md +0 -431
- package/lib/cloud/recipe/category-list.md +0 -132
- package/lib/cloud/recipe/custom.md +0 -265
- package/lib/cloud/recipe/menu.md +0 -276
- package/lib/cloud/recipe/query.md +0 -112
- package/lib/cloud/recipe/record.md +0 -115
- package/lib/cloud/recipe/score.md +0 -112
- package/lib/cloud/recipe/star.md +0 -196
@@ -1,265 +0,0 @@
|
|
1
|
-
## getCustomRecipeList
|
2
|
-
|
3
|
-
获取自定义食谱列表功能。
|
4
|
-
|
5
|
-
### 引入
|
6
|
-
|
7
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
8
|
-
|
9
|
-
```js
|
10
|
-
import { getCustomRecipeList } from '@ray-js/ray'
|
11
|
-
```
|
12
|
-
|
13
|
-
### 参数
|
14
|
-
|
15
|
-
**GetCustomRecipeListParams**
|
16
|
-
|
17
|
-
| 属性 | 类型 | 说明 |
|
18
|
-
| ----- | ------------------- | -------- |
|
19
|
-
| query | `CustomRecipeQuery` | 查询条件 |
|
20
|
-
| devId | `string` | 设备 ID |
|
21
|
-
|
22
|
-
**CustomRecipeQuery**
|
23
|
-
|
24
|
-
| 属性 | 类型 | 说明 |
|
25
|
-
| -------- | -------- | ------------------- |
|
26
|
-
| pageNo | `number` | 分页页号,默认为 0 |
|
27
|
-
| pageSize | `number` | 分页大小,默认为 10 |
|
28
|
-
|
29
|
-
### 返回
|
30
|
-
|
31
|
-
**GetCustomRecipeListResponse**
|
32
|
-
|
33
|
-
`CustomRecipeListResult`,自定义食谱列表返回结果。
|
34
|
-
|
35
|
-
**CustomRecipeListResult**
|
36
|
-
|
37
|
-
| 属性 | 类型 | 说明 |
|
38
|
-
| ---------- | -------------------- | -------------- |
|
39
|
-
| totalCount | `number` | 总记录条数 |
|
40
|
-
| pageNo | `number` | 分页页号 |
|
41
|
-
| pageSize | `number` | 分页大小 |
|
42
|
-
| hasNext | `boolean` | 是否还有下一页 |
|
43
|
-
| data | `CustomRecipeInfo[]` | 食谱信息数组 |
|
44
|
-
|
45
|
-
**CustomRecipeInfo**
|
46
|
-
|
47
|
-
| 属性 | 类型 | 说明 |
|
48
|
-
| ----------- | ---------- | ---------- |
|
49
|
-
| id | `number` | 食谱 ID |
|
50
|
-
| mainImgs | `string[]` | 主图数组 |
|
51
|
-
| lang | `number` | 语言 |
|
52
|
-
| langDesc | `string` | 语言信息 |
|
53
|
-
| cookType | `number` | 烹饪类型 |
|
54
|
-
| sourceType | `number` | 食谱类型 |
|
55
|
-
| name | `string` | 食谱名称 |
|
56
|
-
| gmtCreate | `number` | 创建时间戳 |
|
57
|
-
| gmtModified | `number` | 修改时间戳 |
|
58
|
-
|
59
|
-
### 函数定义示例
|
60
|
-
|
61
|
-
```typescript
|
62
|
-
/**
|
63
|
-
* 获取自定义食谱列表
|
64
|
-
*/
|
65
|
-
export const getCustomRecipeList: (
|
66
|
-
params: GetCustomRecipeListParams
|
67
|
-
) => Promise<GetCustomRecipeListResponse>
|
68
|
-
```
|
69
|
-
|
70
|
-
## addCustomRecipe
|
71
|
-
|
72
|
-
自定义食谱添加功能。
|
73
|
-
|
74
|
-
### 引入
|
75
|
-
|
76
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
77
|
-
|
78
|
-
```js
|
79
|
-
import { addCustomRecipe } from '@ray-js/ray'
|
80
|
-
```
|
81
|
-
|
82
|
-
### 参数
|
83
|
-
|
84
|
-
**AddCustomRecipeParams**
|
85
|
-
|
86
|
-
| 属性 | 类型 | 说明 |
|
87
|
-
| ---------- | ---------------- | -------- |
|
88
|
-
| menuCustom | `MenuCustomInfo` | 食谱信息 |
|
89
|
-
| devId | `string` | 设备 ID |
|
90
|
-
|
91
|
-
**MenuCustomInfo**
|
92
|
-
|
93
|
-
| 属性 | 类型 | 说明 |
|
94
|
-
| -------------- | ----------------- | ------------ |
|
95
|
-
| mainImages | `string[]` | 主图数组 |
|
96
|
-
| name | `string` | 食谱名称 |
|
97
|
-
| desc | `string` | 食谱简介 |
|
98
|
-
| productGroupId | `string` | 产品组 ID |
|
99
|
-
| isPublish | `number` | 是否公开 |
|
100
|
-
| cookType | `number` | 烹饪类型 |
|
101
|
-
| foods | `string` | 食材 |
|
102
|
-
| information | `string` | 相关常识 |
|
103
|
-
| xyxk | `string` | 相宜相克 |
|
104
|
-
| cookTime | `number` | 烹饪时间 |
|
105
|
-
| stepInfoParams | `StepInfoParam[]` | 图文步骤 |
|
106
|
-
| cookStepParams | `CookStepParam[]` | 烹饪步骤信息 |
|
107
|
-
|
108
|
-
下面是根据您提供的类型定义生成的表格:
|
109
|
-
|
110
|
-
### StepInfoParam
|
111
|
-
|
112
|
-
| 字段 | 类型 | 可选性 | 描述 |
|
113
|
-
| ------- | ------ | ------ | ------------ |
|
114
|
-
| stepImg | string | 可选 | 步骤图片路径 |
|
115
|
-
| desc | string | 必须 | 步骤描述 |
|
116
|
-
|
117
|
-
### CookStepParam 表格
|
118
|
-
|
119
|
-
| 字段 | 类型 | 可选性 | 描述 |
|
120
|
-
| ---------- | --------- | ------ | ------------ |
|
121
|
-
| step | number | 必须 | 步骤序号 |
|
122
|
-
| stepImg | string | 可选 | 步骤详图 |
|
123
|
-
| desc | string | 可选 | 步骤描述信息 |
|
124
|
-
| finishCtrl | string | 必须 | 完成执行选项 |
|
125
|
-
| cookArgs | CookArg[] | 必须 | 烹饪参数数组 |
|
126
|
-
|
127
|
-
### CookArg 表格
|
128
|
-
|
129
|
-
| 字段 | 类型 | 可选性 | 描述 |
|
130
|
-
| ------- | ------ | ------ | ------- |
|
131
|
-
| dpCode | string | 必须 | DP Code |
|
132
|
-
| dpValue | string | 必须 | DP 值 |
|
133
|
-
|
134
|
-
### 返回
|
135
|
-
|
136
|
-
**AddCustomRecipeResponse**
|
137
|
-
|
138
|
-
`boolean`,添加成功与否的返回结果。
|
139
|
-
|
140
|
-
### 函数定义示例
|
141
|
-
|
142
|
-
```typescript
|
143
|
-
/**
|
144
|
-
* 自定义食谱添加
|
145
|
-
*/
|
146
|
-
export const addCustomRecipe: (params: AddCustomRecipeParams) => Promise<AddCustomRecipeResponse>
|
147
|
-
```
|
148
|
-
|
149
|
-
## updateCustomRecipe
|
150
|
-
|
151
|
-
自定义食谱更新功能。
|
152
|
-
|
153
|
-
### 引入
|
154
|
-
|
155
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
156
|
-
|
157
|
-
```js
|
158
|
-
import { updateCustomRecipe } from '@ray-js/ray'
|
159
|
-
```
|
160
|
-
|
161
|
-
### 参数
|
162
|
-
|
163
|
-
**UpdateCustomRecipeParams**
|
164
|
-
|
165
|
-
| 属性 | 类型 | 说明 |
|
166
|
-
| ---------- | ---------------------- | -------- |
|
167
|
-
| menuCustom | `UpdateMenuCustomInfo` | 食谱信息 |
|
168
|
-
| devId | `string` | 设备 ID |
|
169
|
-
|
170
|
-
**UpdateMenuCustomInfo**
|
171
|
-
|
172
|
-
| 属性 | 类型 | 说明 |
|
173
|
-
| -------------- | ----------------------- | ------------ |
|
174
|
-
| id | `number` | 食谱 ID |
|
175
|
-
| mainImages | `string[]` | 主图数组 |
|
176
|
-
| name | `string` | 食谱名称 |
|
177
|
-
| desc | `string` | 食谱简介 |
|
178
|
-
| productGroupId | `string` | 产品组 ID |
|
179
|
-
| isPublish | `number` | 是否公开 |
|
180
|
-
| cookType | `number` | 烹饪类型 |
|
181
|
-
| foods | `string` | 食材 |
|
182
|
-
| information | `string` | 相关常识 |
|
183
|
-
| xyxk | `string` | 相宜相克 |
|
184
|
-
| cookTime | `number` | 烹饪时间 |
|
185
|
-
| stepInfoParams | `UpdateStepInfoParam[]` | 图文步骤 |
|
186
|
-
| cookStepParams | `UpdateCookStepParam[]` | 烹饪步骤信息 |
|
187
|
-
|
188
|
-
### UpdateStepInfoParam
|
189
|
-
|
190
|
-
| 字段 | 类型 | 可选性 | 描述 |
|
191
|
-
| ------- | ------ | ------ | ------------ |
|
192
|
-
| step | number | 必须 | 步骤 |
|
193
|
-
| stepImg | string | 可选 | 步骤图片路径 |
|
194
|
-
| desc | string | 必须 | 步骤描述 |
|
195
|
-
|
196
|
-
### UpdateCookStepParam 表格
|
197
|
-
|
198
|
-
| 字段 | 类型 | 可选性 | 描述 |
|
199
|
-
| ---------- | --------- | ------ | ------------ |
|
200
|
-
| step | number | 必须 | 步骤序号 |
|
201
|
-
| stepImg | string | 可选 | 步骤详图 |
|
202
|
-
| desc | string | 可选 | 步骤描述信息 |
|
203
|
-
| finishCtrl | string | 必须 | 完成执行选项 |
|
204
|
-
| cookArgs | CookArg[] | 必须 | 烹饪参数数组 |
|
205
|
-
|
206
|
-
### CookArg 表格
|
207
|
-
|
208
|
-
| 字段 | 类型 | 可选性 | 描述 |
|
209
|
-
| ------- | ------ | ------ | ------- |
|
210
|
-
| dpCode | string | 必须 | DP Code |
|
211
|
-
| dpValue | string | 必须 | DP 值 |
|
212
|
-
|
213
|
-
### 返回
|
214
|
-
|
215
|
-
**UpdateCustomRecipeResponse**
|
216
|
-
|
217
|
-
`boolean`,更新成功与否的返回结果。
|
218
|
-
|
219
|
-
### 函数定义示例
|
220
|
-
|
221
|
-
```typescript
|
222
|
-
/**
|
223
|
-
* 自定义食谱更新
|
224
|
-
*/
|
225
|
-
export const updateCustomRecipe: (
|
226
|
-
params: UpdateCustomRecipeParams
|
227
|
-
) => Promise<UpdateCustomRecipeResponse>
|
228
|
-
```
|
229
|
-
|
230
|
-
## deleteCustomRecipe
|
231
|
-
|
232
|
-
自定义食谱删除功能。
|
233
|
-
|
234
|
-
### 引入
|
235
|
-
|
236
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
237
|
-
|
238
|
-
```js
|
239
|
-
import { deleteCustomRecipe } from '@ray-js/ray'
|
240
|
-
```
|
241
|
-
|
242
|
-
### 参数
|
243
|
-
|
244
|
-
**DeleteCustomRecipeParams**
|
245
|
-
|
246
|
-
| 属性 | 类型 | 说明 |
|
247
|
-
| ------ | -------- | ------- |
|
248
|
-
| menuId | `number` | 食谱 ID |
|
249
|
-
|
250
|
-
### 返回
|
251
|
-
|
252
|
-
**DeleteCustomRecipeResponse**
|
253
|
-
|
254
|
-
`boolean`,删除成功与否的返回结果。
|
255
|
-
|
256
|
-
### 函数定义示例
|
257
|
-
|
258
|
-
```typescript
|
259
|
-
/**
|
260
|
-
* 删除自定义食谱
|
261
|
-
*/
|
262
|
-
export const deleteCustomRecipe: (
|
263
|
-
params: DeleteCustomRecipeParams
|
264
|
-
) => Promise<DeleteCustomRecipeResponse>
|
265
|
-
```
|
package/lib/cloud/recipe/menu.md
DELETED
@@ -1,276 +0,0 @@
|
|
1
|
-
## getRecipeList
|
2
|
-
|
3
|
-
获取食谱列表
|
4
|
-
|
5
|
-
### 引入
|
6
|
-
|
7
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
8
|
-
|
9
|
-
```js
|
10
|
-
import { getRecipeList } from '@ray-js/ray'
|
11
|
-
```
|
12
|
-
|
13
|
-
**参数**
|
14
|
-
|
15
|
-
`GetRecipeListParams` 对象,包含以下属性:
|
16
|
-
|
17
|
-
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
18
|
-
| ----- | ----------------- | ------ | ---- | ---------------- |
|
19
|
-
| query | `RecipeListQuery` | | 是 | 食谱列表查询条件 |
|
20
|
-
|
21
|
-
`RecipeListQuery` 包含以下属性:
|
22
|
-
|
23
|
-
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
24
|
-
| --------------- | ---------- | ------ | ---- | ---------------- |
|
25
|
-
| productId | `string` | | 是 | 产品 ID |
|
26
|
-
| name | `string` | | 否 | 食谱名称 |
|
27
|
-
| categoryIds | `number[]` | | 否 | 分类 ID 数组 |
|
28
|
-
| cookTimeMin | `number` | | 否 | 最小烹饪时间 |
|
29
|
-
| cookTimeMax | `number` | | 否 | 最大烹饪时间 |
|
30
|
-
| easyLevelIds | `number[]` | | 否 | 难易等级 ID 数组 |
|
31
|
-
| foodTypeIds | `number[]` | | 否 | 食品类型 ID 数组 |
|
32
|
-
| allergenIds | `number[]` | | 否 | 过敏原 ID 数组 |
|
33
|
-
| isFoodChannel | `number` | | 否 | 是否为食品频道 |
|
34
|
-
| orderType | `number` | | 否 | 排序类型 |
|
35
|
-
| pvWeight | `number` | | 否 | 浏览量权重 |
|
36
|
-
| starCountWeight | `number` | | 否 | 收藏数权重 |
|
37
|
-
| avgScoreWeight | `number` | | 否 | 平均评分权重 |
|
38
|
-
| pageNo | `number` | | 是 | 页码 |
|
39
|
-
| pageSize | `number` | | 是 | 每页显示数量 |
|
40
|
-
|
41
|
-
**返回结果 RecipeListResponse**
|
42
|
-
|
43
|
-
| 属性 | 类型 | 说明 |
|
44
|
-
| ---------- | -------------- | ------------ |
|
45
|
-
| totalCount | `number` | 总记录数 |
|
46
|
-
| pageNo | `number` | 当前页码 |
|
47
|
-
| pageSize | `number` | 每页记录数 |
|
48
|
-
| hasNext | `boolean` | 是否有下一页 |
|
49
|
-
| data | `RecipeInfo[]` | 食谱信息数组 |
|
50
|
-
|
51
|
-
**RecipeInfo**
|
52
|
-
|
53
|
-
| 属性 | 类型 | 说明 |
|
54
|
-
| ------------- | ---------- | ------------ |
|
55
|
-
| id | `number` | 食谱 ID |
|
56
|
-
| mainImgs | `string[]` | 主图数组 |
|
57
|
-
| lang | `number` | 语言类型 |
|
58
|
-
| langDesc | `string` | 语言描述 |
|
59
|
-
| desc | `string` | 描述 |
|
60
|
-
| cookType | `number` | 烹饪方式 |
|
61
|
-
| sourceType | `number` | 来源类型 |
|
62
|
-
| isMainShow | `number` | 是否主显示 |
|
63
|
-
| isShowControl | `number` | 是否显示控制 |
|
64
|
-
| isControl | `number` | 是否受控 |
|
65
|
-
| name | `string` | 名称 |
|
66
|
-
| easyLevel | `string` | 难易等级 |
|
67
|
-
| easyLevelDesc | `string` | 难易等级描述 |
|
68
|
-
| taste | `string` | 口味 |
|
69
|
-
| tasteDesc | `string` | 口味描述 |
|
70
|
-
| foodType | `string` | 食品类型 |
|
71
|
-
| foodTypeDesc | `string` | 食品类型描述 |
|
72
|
-
| cookTime | `number` | 烹饪时间 |
|
73
|
-
| eatCount | `number` | 用餐人数 |
|
74
|
-
| avgScore | `number` | 平均评分 |
|
75
|
-
| isStar | `boolean` | 是否加星 |
|
76
|
-
| gmtCreate | `number` | 创建时间 |
|
77
|
-
| gmtModified | `number` | 修改时间 |
|
78
|
-
|
79
|
-
**函数定义示例**
|
80
|
-
|
81
|
-
```typescript
|
82
|
-
/**
|
83
|
-
* 获取食谱列表
|
84
|
-
* @param {GetRecipeListParams} params - 包含查询条件的对象
|
85
|
-
* @returns {Promise<RecipeListResponse>} - 返回食谱列表响应的 Promise
|
86
|
-
*/
|
87
|
-
export function getRecipeList(params: GetRecipeListParams): Promise<RecipeListResponse>
|
88
|
-
```
|
89
|
-
|
90
|
-
## getRecipeDetail
|
91
|
-
|
92
|
-
获取食谱详情
|
93
|
-
|
94
|
-
### 引入
|
95
|
-
|
96
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
97
|
-
|
98
|
-
```js
|
99
|
-
import { getRecipeDetail } from '@ray-js/ray'
|
100
|
-
```
|
101
|
-
|
102
|
-
**参数**
|
103
|
-
|
104
|
-
`RecipeDetailParams` 对象,包含以下属性:
|
105
|
-
|
106
|
-
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
107
|
-
| ------ | -------- | ------ | ---- | ------- |
|
108
|
-
| menuId | `number` | | 是 | 食谱 ID |
|
109
|
-
| devId | `string` | | 是 | 设备 ID |
|
110
|
-
|
111
|
-
### `getRecipeList` 返回结果
|
112
|
-
|
113
|
-
`RecipeListResponse` 对象,包含以下属性:
|
114
|
-
|
115
|
-
| 属性 | 类型 | 说明 |
|
116
|
-
| ---------- | -------------- | ------------ |
|
117
|
-
| totalCount | `number` | 总记录数 |
|
118
|
-
| pageNo | `number` | 当前页码 |
|
119
|
-
| pageSize | `number` | 每页记录数 |
|
120
|
-
| hasNext | `boolean` | 是否有下一页 |
|
121
|
-
| data | `RecipeInfo[]` | 食谱信息数组 |
|
122
|
-
|
123
|
-
`RecipeInfo` 对象,包含以下属性:
|
124
|
-
|
125
|
-
| 属性 | 类型 | 说明 |
|
126
|
-
| ------------- | ---------- | ------------ |
|
127
|
-
| id | `number` | 食谱 ID |
|
128
|
-
| mainImgs | `string[]` | 主图数组 |
|
129
|
-
| lang | `number` | 语言类型 |
|
130
|
-
| langDesc | `string` | 语言描述 |
|
131
|
-
| desc | `string` | 描述 |
|
132
|
-
| cookType | `number` | 烹饪方式 |
|
133
|
-
| sourceType | `number` | 来源类型 |
|
134
|
-
| isMainShow | `number` | 是否主显示 |
|
135
|
-
| isShowControl | `number` | 是否显示控制 |
|
136
|
-
| isControl | `number` | 是否受控 |
|
137
|
-
| name | `string` | 名称 |
|
138
|
-
| easyLevel | `string` | 难易等级 |
|
139
|
-
| easyLevelDesc | `string` | 难易等级描述 |
|
140
|
-
| taste | `string` | 口味 |
|
141
|
-
| tasteDesc | `string` | 口味描述 |
|
142
|
-
| foodType | `string` | 食品类型 |
|
143
|
-
| foodTypeDesc | `string` | 食品类型描述 |
|
144
|
-
| cookTime | `number` | 烹饪时间 |
|
145
|
-
| eatCount | `number` | 用餐人数 |
|
146
|
-
| avgScore | `number` | 平均评分 |
|
147
|
-
| isStar | `boolean` | 是否加星 |
|
148
|
-
| gmtCreate | `number` | 创建时间 |
|
149
|
-
| gmtModified | `number` | 修改时间 |
|
150
|
-
|
151
|
-
**返回结果 RecipeDetailResponse**
|
152
|
-
|
153
|
-
| 属性 | 类型 | 说明 |
|
154
|
-
| ------------------ | ------------------ | ------------------ |
|
155
|
-
| id | `number` | 食谱 ID |
|
156
|
-
| name | `string` | 名称 |
|
157
|
-
| desc | `string` | 描述 |
|
158
|
-
| information | `string` | 信息 |
|
159
|
-
| xyxk | `string` | 食谱相关信息 |
|
160
|
-
| foods | `string` | 食材 |
|
161
|
-
| mainImgs | `string[]` | 主图数组 |
|
162
|
-
| origMainImgs | `string[]` | 原始主图数组 |
|
163
|
-
| lang | `number` | 语言类型 |
|
164
|
-
| langDesc | `string` | 语言描述 |
|
165
|
-
| preVideo | `string` | 准备视频 |
|
166
|
-
| stepVideo | `string` | 步骤视频 |
|
167
|
-
| isMainShow | `number` | 是否主显示 |
|
168
|
-
| isControl | `number` | 是否受控 |
|
169
|
-
| isShowControl | `number` | 是否显示控制 |
|
170
|
-
| sourceType | `number` | 来源类型 |
|
171
|
-
| cookType | `number` | 烹饪方式 |
|
172
|
-
| extInfo | `string` | 扩展信息 |
|
173
|
-
| cookTime | `number` | 烹饪时间 |
|
174
|
-
| useFoodLib | `number` | 使用食材库 |
|
175
|
-
| eatCount | `number` | 用餐人数 |
|
176
|
-
| isFoodChannel | `number` | 是否为食品频道 |
|
177
|
-
| easyLevel | `string` | 难易等级 |
|
178
|
-
| easyLevelDesc | `string` | 难易等级描述 |
|
179
|
-
| taste | `string` | 口味 |
|
180
|
-
| tasteDesc | `string` | 口味描述 |
|
181
|
-
| foodType | `string` | 食品类型 |
|
182
|
-
| foodTypeDesc | `string` | 食品类型描述 |
|
183
|
-
| allergens | `AllergenInfo[]` | 过敏原信息数组 |
|
184
|
-
| author | `string` | 作者 |
|
185
|
-
| pv | `number` | 浏览量 |
|
186
|
-
| avgScore | `number` | 平均评分 |
|
187
|
-
| menuStepInfoVOList | `MenuStepInfoVO[]` | 图文步骤信息数组 |
|
188
|
-
| cookStepInfoVOList | `CookStepInfoVO[]` | 烹饪步骤信息数组 |
|
189
|
-
| foodInfoVOList | `FoodInfoVO[]` | 食材信息数组 |
|
190
|
-
| customInfoList | `CustomInfo[]` | 自定义属性信息数组 |
|
191
|
-
| gmtCreate | `number` | 创建时间 |
|
192
|
-
| gmtModified | `number` | 修改时间 |
|
193
|
-
|
194
|
-
**AllergenInfo**
|
195
|
-
|
196
|
-
| 属性 | 类型 | 说明 |
|
197
|
-
| ---- | -------- | ---------- |
|
198
|
-
| id | `number` | 过敏原 ID |
|
199
|
-
| name | `string` | 过敏原名称 |
|
200
|
-
|
201
|
-
**LangInfo**
|
202
|
-
|
203
|
-
| 属性 | 类型 | 说明 |
|
204
|
-
| ----------- | -------- | -------------------- |
|
205
|
-
| lang | `string` | 语言标识 |
|
206
|
-
| stepImg | `string` | 步骤图片(可选) |
|
207
|
-
| origStepImg | `string` | 原始步骤图片(可选) |
|
208
|
-
| desc | `string` | 描述 |
|
209
|
-
|
210
|
-
**MenuStepInfoVO**
|
211
|
-
|
212
|
-
| 属性 | 类型 | 说明 |
|
213
|
-
| ----------- | ------------ | -------------- |
|
214
|
-
| id | `number` | 步骤 ID |
|
215
|
-
| menuId | `number` | 菜单 ID |
|
216
|
-
| step | `number` | 步骤编号 |
|
217
|
-
| langInfos | `LangInfo[]` | 多语言信息数组 |
|
218
|
-
| gmtCreate | `number` | 创建时间 |
|
219
|
-
| gmtModified | `number` | 修改时间 |
|
220
|
-
|
221
|
-
**CookStepInfoVO**
|
222
|
-
|
223
|
-
| 属性 | 类型 | 说明 |
|
224
|
-
| ----------- | ------------ | -------------------- |
|
225
|
-
| id | `number` | 步骤 ID |
|
226
|
-
| menuId | `number` | 菜单 ID |
|
227
|
-
| isCookArgs | `number` | 是否为烹饪参数 |
|
228
|
-
| step | `number` | 步骤编号 |
|
229
|
-
| stepImg | `string` | 步骤图片(可选) |
|
230
|
-
| origStepImg | `string` | 原始步骤图片(可选) |
|
231
|
-
| finishCtrl | `string` | 完成控制(可选) |
|
232
|
-
| cookArgs | `any[]` | 烹饪参数(可选) |
|
233
|
-
| langInfos | `LangInfo[]` | 多语言信息数组 |
|
234
|
-
| gmtCreate | `number` | 创建时间 |
|
235
|
-
| gmtModified | `number` | 修改时间 |
|
236
|
-
|
237
|
-
**FoodInfoVO**
|
238
|
-
|
239
|
-
| 属性 | 类型 | 说明 |
|
240
|
-
| ------------------- | -------- | ---------------- |
|
241
|
-
| id | `number` | 食材 ID |
|
242
|
-
| name | `string` | 食材名称 |
|
243
|
-
| lang | `string` | 语言标识 |
|
244
|
-
| image | `string` | 食材图片 |
|
245
|
-
| desc | `string` | 食材描述 |
|
246
|
-
| menuFoodRelationVO | `any` | 菜单食材关系对象 |
|
247
|
-
| foodNutritionVOList | `any[]` | 食材营养信息数组 |
|
248
|
-
| gmtCreate | `number` | 创建时间 |
|
249
|
-
| gmtModified | `number` | 修改时间 |
|
250
|
-
|
251
|
-
**CustomLangInfo**
|
252
|
-
|
253
|
-
| 属性 | 类型 | 说明 |
|
254
|
-
| ------- | -------- | ---------------- |
|
255
|
-
| lang | `string` | 语言标识 |
|
256
|
-
| name | `string` | 名称 |
|
257
|
-
| desc | `string` | 描述 |
|
258
|
-
| fileUrl | `string` | 文件 URL(可选) |
|
259
|
-
|
260
|
-
**CustomInfo**
|
261
|
-
|
262
|
-
| 属性 | 类型 | 说明 |
|
263
|
-
| --------- | ------------------ | -------------- |
|
264
|
-
| code | `string` | 自定义属性编码 |
|
265
|
-
| langInfos | `CustomLangInfo[]` | 多语言信息数组 |
|
266
|
-
|
267
|
-
**函数定义示例**
|
268
|
-
|
269
|
-
```typescript
|
270
|
-
/**
|
271
|
-
* 获取食谱详情
|
272
|
-
* @param {RecipeDetailParams} params - 包含食谱 ID 和设备 ID 的对象
|
273
|
-
* @returns {Promise<RecipeDetailResponse>} - 返回食谱详情响应的 Promise
|
274
|
-
*/
|
275
|
-
export function getRecipeDetail(params: RecipeDetailParams): Promise<RecipeDetailResponse>
|
276
|
-
```
|
@@ -1,112 +0,0 @@
|
|
1
|
-
## getAllLanguages
|
2
|
-
|
3
|
-
获取食谱所支持的所有语言信息。
|
4
|
-
|
5
|
-
### 引入
|
6
|
-
|
7
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
8
|
-
|
9
|
-
```js
|
10
|
-
import { getAllLanguages } from '@ray-js/ray'
|
11
|
-
```
|
12
|
-
|
13
|
-
**参数**
|
14
|
-
|
15
|
-
无参数。
|
16
|
-
|
17
|
-
**函数定义示例**
|
18
|
-
|
19
|
-
```typescript
|
20
|
-
/**
|
21
|
-
* 获取食谱所支持的所有语言信息
|
22
|
-
* @returns {Promise<GetAllLanguagesResponse>} - 返回获取所有语言信息结果的 Promise 对象
|
23
|
-
*/
|
24
|
-
export function getAllLanguages(): Promise<GetAllLanguagesResponse>
|
25
|
-
```
|
26
|
-
|
27
|
-
---
|
28
|
-
|
29
|
-
## getSearchModel
|
30
|
-
|
31
|
-
获取 C 端用户搜索模型。
|
32
|
-
|
33
|
-
### 引入
|
34
|
-
|
35
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
36
|
-
|
37
|
-
```js
|
38
|
-
import { getSearchModel } from '@ray-js/ray'
|
39
|
-
```
|
40
|
-
|
41
|
-
**参数**
|
42
|
-
|
43
|
-
**GetSearchModelParams params**
|
44
|
-
|
45
|
-
封装了获取搜索模型的参数对象。
|
46
|
-
|
47
|
-
**参数属性 GetSearchModelParams**
|
48
|
-
|
49
|
-
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
50
|
-
| --------- | -------- | ------ | ---- | ------- |
|
51
|
-
| productId | `string` | | 是 | 产品 ID |
|
52
|
-
|
53
|
-
**函数定义示例**
|
54
|
-
|
55
|
-
```typescript
|
56
|
-
/**
|
57
|
-
* 获取 C 端用户搜索模型
|
58
|
-
* @param {GetSearchModelParams} params - 封装了获取搜索模型的参数对象
|
59
|
-
* @returns {Promise<SearchModelResponse>} - 返回获取搜索模型结果的 Promise 对象
|
60
|
-
*/
|
61
|
-
export function getSearchModel(params: GetSearchModelParams): Promise<SearchModelResponse>
|
62
|
-
```
|
63
|
-
|
64
|
-
---
|
65
|
-
|
66
|
-
## getCookingTimeCondition
|
67
|
-
|
68
|
-
获取已上线食谱的最小、最大烹饪时间。
|
69
|
-
|
70
|
-
### 引入
|
71
|
-
|
72
|
-
> @ray-js/ray^1.5.0 以上版本可使用
|
73
|
-
|
74
|
-
```js
|
75
|
-
import { getCookingTimeCondition } from '@ray-js/ray'
|
76
|
-
```
|
77
|
-
|
78
|
-
**参数**
|
79
|
-
|
80
|
-
**GetCookingTimeConditionParams params**
|
81
|
-
|
82
|
-
封装了获取烹饪时间筛选条件的参数对象。
|
83
|
-
|
84
|
-
**参数属性 GetCookingTimeConditionParams**
|
85
|
-
|
86
|
-
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
87
|
-
| ----- | ---------------------- | ------ | ---- | -------- |
|
88
|
-
| query | `CookingTimeCondition` | | 是 | 查询条件 |
|
89
|
-
| devId | `string` | | 是 | 设备 ID |
|
90
|
-
|
91
|
-
### CookingTimeCondition
|
92
|
-
|
93
|
-
烹饪时间筛选条件。
|
94
|
-
|
95
|
-
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
96
|
-
| ----------- | ---------- | ------ | ---- | -------- |
|
97
|
-
| sourceType | `number` | | 是 | 食谱类型 |
|
98
|
-
| name | `string` | | 否 | 食谱名称 |
|
99
|
-
| categoryIds | `number[]` | | 否 | 分类 IDs |
|
100
|
-
|
101
|
-
**函数定义示例**
|
102
|
-
|
103
|
-
```typescript
|
104
|
-
/**
|
105
|
-
* 获取已上线食谱的最小、最大烹饪时间
|
106
|
-
* @param {GetCookingTimeConditionParams} params - 封装了获取烹饪时间筛选条件的参数对象
|
107
|
-
* @returns {Promise<CookingTimeConditionResponse>} - 返回获取烹饪时间筛选条件结果的 Promise 对象
|
108
|
-
*/
|
109
|
-
export function getCookingTimeCondition(
|
110
|
-
params: GetCookingTimeConditionParams
|
111
|
-
): Promise<CookingTimeConditionResponse>
|
112
|
-
```
|