@ray-js/api 1.5.0-beta.11 → 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/device.d.ts +25 -1
- package/lib/cloud/device.js +15 -1
- 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 +30 -9
- 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/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/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 +26 -11
- package/lib/panel/normalizeNetwork.js +1 -1
- 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 +17 -1
- package/lib/viewAPI.d.ts +1 -0
- package/lib/viewAPI.js +4 -3
- package/package.json +9 -8
- package/@types/PlayNetKit.d.ts +0 -444
- package/lib/nativeRouters/scene.d.ts +0 -34
- package/lib/nativeRouters/scene.js +0 -60
@@ -0,0 +1,177 @@
|
|
1
|
+
/**
|
2
|
+
* CustomRecipeQuery - 自定义食谱列表查询条件
|
3
|
+
*/
|
4
|
+
type CustomRecipeQuery = {
|
5
|
+
pageNo?: number;
|
6
|
+
pageSize?: number;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* GetCustomRecipeListParams - 自定义食谱列表请求参数
|
10
|
+
*/
|
11
|
+
type GetCustomRecipeListParams = {
|
12
|
+
query: CustomRecipeQuery;
|
13
|
+
devId: string;
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* CustomRecipeInfo - 食谱信息
|
17
|
+
*/
|
18
|
+
type CustomRecipeInfo = {
|
19
|
+
id: number;
|
20
|
+
mainImgs: string[];
|
21
|
+
lang: number;
|
22
|
+
langDesc: string;
|
23
|
+
cookType: number;
|
24
|
+
sourceType: number;
|
25
|
+
name: string;
|
26
|
+
gmtCreate: number;
|
27
|
+
gmtModified: number;
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* CustomRecipeListResult - 自定义食谱列表返回结果
|
31
|
+
*/
|
32
|
+
type CustomRecipeListResult = {
|
33
|
+
totalCount: number;
|
34
|
+
pageNo: number;
|
35
|
+
pageSize: number;
|
36
|
+
hasNext: boolean;
|
37
|
+
data: CustomRecipeInfo[];
|
38
|
+
};
|
39
|
+
/**
|
40
|
+
* GetCustomRecipeListResponse - 自定义食谱列表响应
|
41
|
+
*/
|
42
|
+
type GetCustomRecipeListResponse = CustomRecipeListResult;
|
43
|
+
/**
|
44
|
+
* 获取自定义食谱列表
|
45
|
+
* @param {GetCustomRecipeListParams} params - 自定义食谱列表请求参数
|
46
|
+
* @returns {Promise<GetCustomRecipeListResponse>} - 自定义食谱列表响应的 Promise
|
47
|
+
*/
|
48
|
+
export declare const getCustomRecipeList: (params: GetCustomRecipeListParams) => Promise<GetCustomRecipeListResponse>;
|
49
|
+
/**
|
50
|
+
* 图文步骤参数
|
51
|
+
*/
|
52
|
+
type StepInfoParam = {
|
53
|
+
step: number;
|
54
|
+
stepImg?: string;
|
55
|
+
desc: string;
|
56
|
+
};
|
57
|
+
/**
|
58
|
+
* 烹饪步骤信息参数
|
59
|
+
*/
|
60
|
+
type CookStepParam = {
|
61
|
+
step: number;
|
62
|
+
stepImg?: string;
|
63
|
+
desc?: string;
|
64
|
+
finishCtrl: string;
|
65
|
+
cookArgs: CookArg[];
|
66
|
+
};
|
67
|
+
/**
|
68
|
+
* 烹饪参数
|
69
|
+
*/
|
70
|
+
type CookArg = {
|
71
|
+
dpCode: string;
|
72
|
+
dpValue: string;
|
73
|
+
};
|
74
|
+
/**
|
75
|
+
* 自定义食谱信息
|
76
|
+
*/
|
77
|
+
type MenuCustomInfo = {
|
78
|
+
mainImages: string[];
|
79
|
+
name: string;
|
80
|
+
desc?: string;
|
81
|
+
productGroupId: string;
|
82
|
+
isPublish?: number;
|
83
|
+
cookType: number;
|
84
|
+
foods?: string;
|
85
|
+
information?: string;
|
86
|
+
xyxk?: string;
|
87
|
+
cookTime?: number;
|
88
|
+
stepInfoParams: StepInfoParam[];
|
89
|
+
cookStepParams: CookStepParam[];
|
90
|
+
};
|
91
|
+
/**
|
92
|
+
* AddCustomRecipeParams - 自定义食谱添加请求参数
|
93
|
+
*/
|
94
|
+
type AddCustomRecipeParams = {
|
95
|
+
menuCustom: MenuCustomInfo;
|
96
|
+
devId: string;
|
97
|
+
};
|
98
|
+
/**
|
99
|
+
* AddCustomRecipeResponse - 自定义食谱添加响应
|
100
|
+
*/
|
101
|
+
type AddCustomRecipeResponse = boolean;
|
102
|
+
/**
|
103
|
+
* 自定义食谱添加
|
104
|
+
* @param {AddCustomRecipeParams} params - 自定义食谱添加请求参数
|
105
|
+
* @returns {Promise<AddCustomRecipeResponse>} - 自定义食谱添加响应的 Promise
|
106
|
+
*/
|
107
|
+
export declare const addCustomRecipe: (params: AddCustomRecipeParams) => Promise<AddCustomRecipeResponse>;
|
108
|
+
/**
|
109
|
+
* 图文步骤参数
|
110
|
+
*/
|
111
|
+
type UpdateStepInfoParam = {
|
112
|
+
step: number;
|
113
|
+
stepImg?: string;
|
114
|
+
desc: string;
|
115
|
+
};
|
116
|
+
/**
|
117
|
+
* 烹饪步骤信息参数
|
118
|
+
*/
|
119
|
+
type UpdateCookStepParam = {
|
120
|
+
step: number;
|
121
|
+
stepImg?: string;
|
122
|
+
desc?: string;
|
123
|
+
finishCtrl: string;
|
124
|
+
cookArgs: CookArg[];
|
125
|
+
};
|
126
|
+
/**
|
127
|
+
* 自定义食谱信息
|
128
|
+
*/
|
129
|
+
type UpdateMenuCustomInfo = {
|
130
|
+
id: number;
|
131
|
+
mainImages: string[];
|
132
|
+
name: string;
|
133
|
+
desc?: string;
|
134
|
+
productGroupId: string;
|
135
|
+
isPublish?: number;
|
136
|
+
cookType: number;
|
137
|
+
foods?: string;
|
138
|
+
information?: string;
|
139
|
+
xyxk?: string;
|
140
|
+
cookTime?: number;
|
141
|
+
stepInfoParams: UpdateStepInfoParam[];
|
142
|
+
cookStepParams: UpdateCookStepParam[];
|
143
|
+
};
|
144
|
+
/**
|
145
|
+
* UpdateCustomRecipeParams - 自定义食谱更新请求参数
|
146
|
+
*/
|
147
|
+
type UpdateCustomRecipeParams = {
|
148
|
+
menuCustom: UpdateMenuCustomInfo;
|
149
|
+
devId: string;
|
150
|
+
};
|
151
|
+
/**
|
152
|
+
* UpdateCustomRecipeResponse - 自定义食谱更新响应
|
153
|
+
*/
|
154
|
+
type UpdateCustomRecipeResponse = boolean;
|
155
|
+
/**
|
156
|
+
* 自定义食谱更新
|
157
|
+
* @param {UpdateCustomRecipeParams} params - 自定义食谱更新请求参数
|
158
|
+
* @returns {Promise<UpdateCustomRecipeResponse>} - 自定义食谱更新响应的 Promise
|
159
|
+
*/
|
160
|
+
export declare const updateCustomRecipe: (params: UpdateCustomRecipeParams) => Promise<UpdateCustomRecipeResponse>;
|
161
|
+
/**
|
162
|
+
* DeleteCustomRecipeParams - 自定义食谱删除请求参数
|
163
|
+
*/
|
164
|
+
type DeleteCustomRecipeParams = {
|
165
|
+
menuId: number;
|
166
|
+
};
|
167
|
+
/**
|
168
|
+
* DeleteCustomRecipeResponse - 自定义食谱删除响应
|
169
|
+
*/
|
170
|
+
type DeleteCustomRecipeResponse = boolean;
|
171
|
+
/**
|
172
|
+
* 删除自定义食谱
|
173
|
+
* @param {DeleteCustomRecipeParams} params - 自定义食谱删除请求参数
|
174
|
+
* @returns {Promise<DeleteCustomRecipeResponse>} - 自定义食谱删除响应的 Promise
|
175
|
+
*/
|
176
|
+
export declare const deleteCustomRecipe: (params: DeleteCustomRecipeParams) => Promise<DeleteCustomRecipeResponse>;
|
177
|
+
export {};
|
@@ -0,0 +1,171 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
+
const _excluded = ["query"],
|
4
|
+
_excluded2 = ["menuCustom"],
|
5
|
+
_excluded3 = ["menuCustom"];
|
6
|
+
import { THING } from '../../constants';
|
7
|
+
import requestCloud from '../../requestCloud';
|
8
|
+
// #region 自定义食谱列表
|
9
|
+
|
10
|
+
/**
|
11
|
+
* CustomRecipeQuery - 自定义食谱列表查询条件
|
12
|
+
*/
|
13
|
+
|
14
|
+
/**
|
15
|
+
* GetCustomRecipeListParams - 自定义食谱列表请求参数
|
16
|
+
*/
|
17
|
+
|
18
|
+
/**
|
19
|
+
* CustomRecipeInfo - 食谱信息
|
20
|
+
*/
|
21
|
+
|
22
|
+
/**
|
23
|
+
* CustomRecipeListResult - 自定义食谱列表返回结果
|
24
|
+
*/
|
25
|
+
|
26
|
+
/**
|
27
|
+
* GetCustomRecipeListResponse - 自定义食谱列表响应
|
28
|
+
*/
|
29
|
+
|
30
|
+
// 返回结果
|
31
|
+
|
32
|
+
/**
|
33
|
+
* 获取自定义食谱列表
|
34
|
+
* @param {GetCustomRecipeListParams} params - 自定义食谱列表请求参数
|
35
|
+
* @returns {Promise<GetCustomRecipeListResponse>} - 自定义食谱列表响应的 Promise
|
36
|
+
*/
|
37
|
+
export const getCustomRecipeList = params => {
|
38
|
+
const {
|
39
|
+
query
|
40
|
+
} = params,
|
41
|
+
rest = _objectWithoutProperties(params, _excluded);
|
42
|
+
return requestCloud({
|
43
|
+
api: "".concat(THING, ".m.menu.custom.lang.list"),
|
44
|
+
version: '1.0',
|
45
|
+
data: _objectSpread({
|
46
|
+
queryJson: JSON.stringify(query)
|
47
|
+
}, rest)
|
48
|
+
});
|
49
|
+
};
|
50
|
+
|
51
|
+
// #endregion
|
52
|
+
|
53
|
+
// #region 自定义食谱添加
|
54
|
+
|
55
|
+
/**
|
56
|
+
* 图文步骤参数
|
57
|
+
*/
|
58
|
+
|
59
|
+
/**
|
60
|
+
* 烹饪步骤信息参数
|
61
|
+
*/
|
62
|
+
|
63
|
+
/**
|
64
|
+
* 烹饪参数
|
65
|
+
*/
|
66
|
+
|
67
|
+
/**
|
68
|
+
* 自定义食谱信息
|
69
|
+
*/
|
70
|
+
|
71
|
+
/**
|
72
|
+
* AddCustomRecipeParams - 自定义食谱添加请求参数
|
73
|
+
*/
|
74
|
+
|
75
|
+
/**
|
76
|
+
* AddCustomRecipeResponse - 自定义食谱添加响应
|
77
|
+
*/
|
78
|
+
|
79
|
+
// 返回结果
|
80
|
+
|
81
|
+
/**
|
82
|
+
* 自定义食谱添加
|
83
|
+
* @param {AddCustomRecipeParams} params - 自定义食谱添加请求参数
|
84
|
+
* @returns {Promise<AddCustomRecipeResponse>} - 自定义食谱添加响应的 Promise
|
85
|
+
*/
|
86
|
+
export const addCustomRecipe = params => {
|
87
|
+
const {
|
88
|
+
menuCustom
|
89
|
+
} = params,
|
90
|
+
rest = _objectWithoutProperties(params, _excluded2);
|
91
|
+
return requestCloud({
|
92
|
+
api: "".concat(THING, ".m.menu.diy.add"),
|
93
|
+
version: '2.0',
|
94
|
+
data: _objectSpread({
|
95
|
+
menuCustomJson: JSON.stringify(menuCustom)
|
96
|
+
}, rest)
|
97
|
+
});
|
98
|
+
};
|
99
|
+
|
100
|
+
// #endregion
|
101
|
+
|
102
|
+
// #region 自定义食谱更新
|
103
|
+
/**
|
104
|
+
* 图文步骤参数
|
105
|
+
*/
|
106
|
+
|
107
|
+
/**
|
108
|
+
* 烹饪步骤信息参数
|
109
|
+
*/
|
110
|
+
|
111
|
+
/**
|
112
|
+
* 自定义食谱信息
|
113
|
+
*/
|
114
|
+
|
115
|
+
/**
|
116
|
+
* UpdateCustomRecipeParams - 自定义食谱更新请求参数
|
117
|
+
*/
|
118
|
+
|
119
|
+
/**
|
120
|
+
* UpdateCustomRecipeResponse - 自定义食谱更新响应
|
121
|
+
*/
|
122
|
+
|
123
|
+
// 返回结果
|
124
|
+
|
125
|
+
/**
|
126
|
+
* 自定义食谱更新
|
127
|
+
* @param {UpdateCustomRecipeParams} params - 自定义食谱更新请求参数
|
128
|
+
* @returns {Promise<UpdateCustomRecipeResponse>} - 自定义食谱更新响应的 Promise
|
129
|
+
*/
|
130
|
+
export const updateCustomRecipe = params => {
|
131
|
+
const {
|
132
|
+
menuCustom
|
133
|
+
} = params,
|
134
|
+
rest = _objectWithoutProperties(params, _excluded3);
|
135
|
+
return requestCloud({
|
136
|
+
api: "".concat(THING, ".m.menu.diy.update"),
|
137
|
+
version: '2.0',
|
138
|
+
data: _objectSpread({
|
139
|
+
menuCustomJson: JSON.stringify(menuCustom)
|
140
|
+
}, rest)
|
141
|
+
});
|
142
|
+
};
|
143
|
+
|
144
|
+
// #endregion
|
145
|
+
|
146
|
+
// #region 自定义食谱删除
|
147
|
+
|
148
|
+
/**
|
149
|
+
* DeleteCustomRecipeParams - 自定义食谱删除请求参数
|
150
|
+
*/
|
151
|
+
|
152
|
+
/**
|
153
|
+
* DeleteCustomRecipeResponse - 自定义食谱删除响应
|
154
|
+
*/
|
155
|
+
|
156
|
+
// 返回结果
|
157
|
+
|
158
|
+
/**
|
159
|
+
* 删除自定义食谱
|
160
|
+
* @param {DeleteCustomRecipeParams} params - 自定义食谱删除请求参数
|
161
|
+
* @returns {Promise<DeleteCustomRecipeResponse>} - 自定义食谱删除响应的 Promise
|
162
|
+
*/
|
163
|
+
export const deleteCustomRecipe = params => {
|
164
|
+
return requestCloud({
|
165
|
+
api: "".concat(THING, ".m.menu.diy.delete"),
|
166
|
+
version: '1.0',
|
167
|
+
data: params
|
168
|
+
});
|
169
|
+
};
|
170
|
+
|
171
|
+
// #endregion
|
@@ -0,0 +1,265 @@
|
|
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
|
+
```
|