@ray-js/api 1.4.61 → 1.4.63

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 (62) hide show
  1. package/@types/P2PKit.d.ts +24 -2
  2. package/lib/P2PKit-2.0.3.d.ts +1 -0
  3. package/lib/P2PKit-2.0.3.js +3 -0
  4. package/lib/PlayNetKit-1.1.3.d.ts +24 -25
  5. package/lib/cloud/device.js +1 -1
  6. package/lib/cloud/doorlock/README.md +3 -0
  7. package/lib/cloud/doorlock/auth.d.ts +235 -0
  8. package/lib/cloud/doorlock/auth.js +223 -0
  9. package/lib/cloud/doorlock/device.d.ts +137 -0
  10. package/lib/cloud/doorlock/device.js +187 -0
  11. package/lib/cloud/doorlock/index.d.ts +10 -0
  12. package/lib/cloud/doorlock/index.js +20 -0
  13. package/lib/cloud/doorlock/log.d.ts +113 -0
  14. package/lib/cloud/doorlock/log.js +53 -0
  15. package/lib/cloud/doorlock/member-opmode.d.ts +121 -0
  16. package/lib/cloud/doorlock/member-opmode.js +104 -0
  17. package/lib/cloud/doorlock/member.d.ts +110 -0
  18. package/lib/cloud/doorlock/member.js +72 -0
  19. package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
  20. package/lib/cloud/doorlock/offline-pwd.js +67 -0
  21. package/lib/cloud/{doorlock.js → doorlock/old.js} +3 -2
  22. package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
  23. package/lib/cloud/doorlock/temp-pwd.js +193 -0
  24. package/lib/cloud/doorlock/unlock-method.d.ts +62 -0
  25. package/lib/cloud/doorlock/unlock-method.js +85 -0
  26. package/lib/cloud/doorlock/unlock.d.ts +89 -0
  27. package/lib/cloud/doorlock/unlock.js +76 -0
  28. package/lib/cloud/index.d.ts +3 -1
  29. package/lib/cloud/index.js +7 -4
  30. package/lib/cloud/interface.d.ts +26 -0
  31. package/lib/cloud/recipe/basket.d.ts +220 -0
  32. package/lib/cloud/recipe/basket.js +328 -0
  33. package/lib/cloud/recipe/category-list.d.ts +71 -0
  34. package/lib/cloud/recipe/category-list.js +65 -0
  35. package/lib/cloud/recipe/custom.d.ts +177 -0
  36. package/lib/cloud/recipe/custom.js +172 -0
  37. package/lib/cloud/recipe/index.d.ts +8 -0
  38. package/lib/cloud/recipe/index.js +8 -0
  39. package/lib/cloud/recipe/menu.d.ts +170 -0
  40. package/lib/cloud/recipe/menu.js +76 -0
  41. package/lib/cloud/recipe/query.d.ts +87 -0
  42. package/lib/cloud/recipe/query.js +101 -0
  43. package/lib/cloud/recipe/record.d.ts +54 -0
  44. package/lib/cloud/recipe/record.js +87 -0
  45. package/lib/cloud/recipe/score.d.ts +69 -0
  46. package/lib/cloud/recipe/score.js +106 -0
  47. package/lib/cloud/recipe/star.d.ts +131 -0
  48. package/lib/cloud/recipe/star.js +151 -0
  49. package/lib/cloud/recipe/types.d.ts +7 -0
  50. package/lib/cloud/recipe/types.js +0 -0
  51. package/lib/cloud/remoteGroup.d.ts +10 -0
  52. package/lib/cloud/remoteGroup.js +31 -0
  53. package/lib/errorCode.d.ts +4 -0
  54. package/lib/errorCode.js +3 -0
  55. package/lib/nativeRouters/common.js +5 -2
  56. package/lib/nativeRouters/index.d.ts +1 -0
  57. package/lib/nativeRouters/index.js +2 -1
  58. package/lib/nativeRouters/remoteGroup.d.ts +22 -0
  59. package/lib/nativeRouters/remoteGroup.js +11 -0
  60. package/package.json +5 -5
  61. package/@types/PlayNetKit.d.ts +0 -444
  62. /package/lib/cloud/{doorlock.d.ts → doorlock/old.d.ts} +0 -0
@@ -0,0 +1,101 @@
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
+
7
+ // #region 获取食谱所有语言
8
+
9
+ /**
10
+ * GetAllLanguagesParams - 获取食谱所有语言参数
11
+ */
12
+
13
+ /**
14
+ * LanguageDescription - 语言描述信息
15
+ */
16
+
17
+ /**
18
+ * GetAllLanguagesResponse - 获取食谱所有语言响应
19
+ */
20
+
21
+ /**
22
+ * 获取食谱所支持的所有语言信息
23
+ * @returns {Promise<GetAllLanguagesResponse>} - 获取所有语言信息结果的 Promise
24
+ */
25
+ export const getAllLanguages = () => {
26
+ return requestCloud({
27
+ api: THING + '.m.cookbook.all.lang',
28
+ version: '1.0',
29
+ data: {}
30
+ });
31
+ };
32
+
33
+ // #endregion
34
+
35
+ // #region 获取搜索模型
36
+
37
+ /**
38
+ * GetSearchModelParams - 获取搜索模型参数
39
+ */
40
+
41
+ /**
42
+ * SearchModelResponse - 获取搜索模型响应
43
+ */
44
+
45
+ /**
46
+ * Metadata - 元数据信息
47
+ */
48
+
49
+ /**
50
+ * ProductGroup - 产品组信息
51
+ */
52
+
53
+ /**
54
+ * 获取 C 端用户搜索模型
55
+ * @param {GetSearchModelParams} params - 获取搜索模型参数
56
+ * @returns {Promise<SearchModelResponse>} - 获取搜索模型结果的 Promise
57
+ */
58
+ export const getSearchModel = params => {
59
+ return requestCloud({
60
+ api: THING + '.m.menu.query.model.list',
61
+ version: '1.0',
62
+ data: params
63
+ });
64
+ };
65
+
66
+ // #endregion
67
+
68
+ // #region 获取烹饪时间筛选条件
69
+
70
+ /**
71
+ * CookingTimeCondition - 烹饪时间筛选条件
72
+ */
73
+
74
+ /**
75
+ * GetCookingTimeConditionParams - 获取烹饪时间筛选条件参数
76
+ */
77
+
78
+ /**
79
+ * CookingTimeConditionResponse - 获取烹饪时间筛选条件响应
80
+ */
81
+
82
+ /**
83
+ * 获取已上线食谱的最小、最大烹饪时间
84
+ * @param {GetCookingTimeConditionParams} params - 获取烹饪时间筛选条件参数
85
+ * @returns {Promise<CookingTimeConditionResponse>} - 获取烹饪时间筛选条件结果的 Promise
86
+ */
87
+ export const getCookingTimeCondition = params => {
88
+ const {
89
+ query
90
+ } = params,
91
+ rest = _objectWithoutProperties(params, _excluded);
92
+ return requestCloud({
93
+ api: THING + '.m.menu.search.condition',
94
+ version: '1.0',
95
+ data: _objectSpread({
96
+ queryJson: JSON.stringify(query)
97
+ }, rest)
98
+ });
99
+ };
100
+
101
+ // #endregion
@@ -0,0 +1,54 @@
1
+ /**
2
+ * SearchHistoryListParams - 搜索记录列表参数
3
+ */
4
+ type SearchHistoryListParams = {
5
+ devId: string;
6
+ };
7
+ /**
8
+ * SearchHistory - 搜索记录
9
+ */
10
+ type SearchHistory = string;
11
+ /**
12
+ * SearchHistoryListResponse - 搜索记录列表响应
13
+ */
14
+ type SearchHistoryListResponse = SearchHistory[];
15
+ /**
16
+ * 获取搜索历史记录列表
17
+ * @param params - 搜索记录列表参数
18
+ * @returns 获取搜索记录列表结果的 Promise
19
+ */
20
+ export declare function getSearchHistoryList(params: SearchHistoryListParams): Promise<SearchHistoryListResponse>;
21
+ /**
22
+ * DeleteSearchHistoryParams - 搜索记录单条删除参数
23
+ */
24
+ type DeleteSearchHistoryParams = {
25
+ name: string;
26
+ devId: string;
27
+ };
28
+ /**
29
+ * DeleteSearchHistoryResponse - 搜索记录单条删除响应
30
+ */
31
+ type DeleteSearchHistoryResponse = boolean;
32
+ /**
33
+ * 删除单条搜索历史记录
34
+ * @param params - 搜索记录单条删除参数
35
+ * @returns 删除单条搜索历史记录结果的 Promise
36
+ */
37
+ export declare function deleteSearchHistory(params: DeleteSearchHistoryParams): Promise<DeleteSearchHistoryResponse>;
38
+ /**
39
+ * CleanSearchHistoryParams - 搜索记录清空参数
40
+ */
41
+ type CleanSearchHistoryParams = {
42
+ devId: string;
43
+ };
44
+ /**
45
+ * CleanSearchHistoryResponse - 搜索记录清空响应
46
+ */
47
+ type CleanSearchHistoryResponse = boolean;
48
+ /**
49
+ * 清空搜索历史记录
50
+ * @param params - 搜索记录清空参数
51
+ * @returns 清空搜索历史记录结果的 Promise
52
+ */
53
+ export declare function cleanSearchHistory(params: CleanSearchHistoryParams): Promise<CleanSearchHistoryResponse>;
54
+ export {};
@@ -0,0 +1,87 @@
1
+ // #region 搜索记录列表
2
+
3
+ import { THING } from '../../constants';
4
+ import requestCloud from '../../requestCloud';
5
+
6
+ /**
7
+ * SearchHistoryListParams - 搜索记录列表参数
8
+ */
9
+
10
+ /**
11
+ * SearchHistory - 搜索记录
12
+ */
13
+
14
+ /**
15
+ * SearchHistoryListResponse - 搜索记录列表响应
16
+ */
17
+
18
+ // 返回结果
19
+
20
+ /**
21
+ * 获取搜索历史记录列表
22
+ * @param params - 搜索记录列表参数
23
+ * @returns 获取搜索记录列表结果的 Promise
24
+ */
25
+ export function getSearchHistoryList(params) {
26
+ return requestCloud({
27
+ api: THING + '.m.menu.query.history.list',
28
+ version: '1.0',
29
+ data: params
30
+ });
31
+ }
32
+
33
+ // #endregion
34
+
35
+ // #region 搜索记录单条删除
36
+
37
+ /**
38
+ * DeleteSearchHistoryParams - 搜索记录单条删除参数
39
+ */
40
+
41
+ /**
42
+ * DeleteSearchHistoryResponse - 搜索记录单条删除响应
43
+ */
44
+
45
+ // 返回结果,是否删除成功
46
+
47
+ /**
48
+ * 删除单条搜索历史记录
49
+ * @param params - 搜索记录单条删除参数
50
+ * @returns 删除单条搜索历史记录结果的 Promise
51
+ */
52
+ export function deleteSearchHistory(params) {
53
+ return requestCloud({
54
+ api: THING + '.m.menu.query.history.delete',
55
+ version: '1.0',
56
+ data: params
57
+ });
58
+ }
59
+
60
+ // #endregion
61
+
62
+ // #region 搜索记录清空
63
+
64
+ /**
65
+ * CleanSearchHistoryParams - 搜索记录清空参数
66
+ */
67
+
68
+ /**
69
+ * CleanSearchHistoryResponse - 搜索记录清空响应
70
+ */
71
+
72
+ // 返回结果,是否清空成功
73
+
74
+ /**
75
+ * 清空搜索历史记录
76
+ * @param params - 搜索记录清空参数
77
+ * @returns 清空搜索历史记录结果的 Promise
78
+ */
79
+ export function cleanSearchHistory(params) {
80
+ return requestCloud({
81
+ api: THING + '.m.menu.query.history.clean',
82
+ version: '1.0',
83
+ data: params
84
+ });
85
+ }
86
+
87
+ // #endregion
@@ -0,0 +1,69 @@
1
+ /**
2
+ * 用户评分信息
3
+ */
4
+ type ScoreInfo = {
5
+ menuId: number;
6
+ score: number;
7
+ };
8
+ /**
9
+ * AddRecipeScoreParams - 用户添加评分参数
10
+ */
11
+ type AddRecipeScoreParams = {
12
+ scoreInfo: ScoreInfo;
13
+ };
14
+ /**
15
+ * AddRecipeScoreResponse - 用户添加评分响应
16
+ */
17
+ type AddRecipeScoreResponse = boolean;
18
+ /**
19
+ * 用户添加评分
20
+ * @param {AddRecipeScoreParams} params - 用户添加评分参数
21
+ * @returns {Promise<AddRecipeScoreResponse>} - 用户添加评分结果的 Promise
22
+ */
23
+ export declare const addRecipeScore: (params: AddRecipeScoreParams) => Promise<AddRecipeScoreResponse>;
24
+ /**
25
+ * GetRecipeScoreByMenuIdParams - 用户通过食谱 ID 获取评分信息参数
26
+ */
27
+ type GetRecipeScoreByMenuIdParams = {
28
+ menuId: number;
29
+ };
30
+ /**
31
+ * 评分结果
32
+ */
33
+ type ScoreResult = {
34
+ score: number;
35
+ menuId: number;
36
+ };
37
+ /**
38
+ * GetRecipeScoreByMenuIdResponse - 用户通过食谱 ID 获取评分信息响应
39
+ */
40
+ type GetRecipeScoreByMenuIdResponse = ScoreResult;
41
+ /**
42
+ * 用户通过食谱 ID 获取评分信息
43
+ * @param {GetRecipeScoreByMenuIdParams} params - 用户获取评分信息参数
44
+ * @returns {Promise<GetRecipeScoreByMenuIdResponse>} - 用户获取评分信息结果的 Promise
45
+ */
46
+ export declare const getRecipeScoreByMenuId: (params: GetRecipeScoreByMenuIdParams) => Promise<GetRecipeScoreByMenuIdResponse>;
47
+ /**
48
+ * QueryCondition - 查询条件
49
+ */
50
+ type QueryCondition = {
51
+ menuIds: number[];
52
+ };
53
+ /**
54
+ * GetRecipeScoresByMenuIdsParams - 用户通过食谱 IDs 获取评分信息参数
55
+ */
56
+ type GetRecipeScoresByMenuIdsParams = {
57
+ query: QueryCondition;
58
+ };
59
+ /**
60
+ * GetRecipeScoresByMenuIdsResponse - 用户通过食谱 IDs 获取评分信息响应
61
+ */
62
+ type GetRecipeScoresByMenuIdsResponse = ScoreResult[];
63
+ /**
64
+ * 用户通过食谱 IDs 获取评分信息
65
+ * @param {GetRecipeScoresByMenuIdsParams} params - 用户获取评分信息参数
66
+ * @returns {Promise<GetRecipeScoresByMenuIdsResponse>} - 用户获取评分信息结果的 Promise
67
+ */
68
+ export declare const getRecipeScoresByMenuIds: (params: GetRecipeScoresByMenuIdsParams) => Promise<GetRecipeScoresByMenuIdsResponse>;
69
+ export {};
@@ -0,0 +1,106 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ const _excluded = ["scoreInfo"],
4
+ _excluded2 = ["query"];
5
+ import { THING } from '../../constants';
6
+ import requestCloud from '../../requestCloud';
7
+ // #region 用户添加评分
8
+
9
+ /**
10
+ * 用户评分信息
11
+ */
12
+
13
+ /**
14
+ * AddRecipeScoreParams - 用户添加评分参数
15
+ */
16
+
17
+ /**
18
+ * AddRecipeScoreResponse - 用户添加评分响应
19
+ */
20
+
21
+ // 返回结果
22
+
23
+ /**
24
+ * 用户添加评分
25
+ * @param {AddRecipeScoreParams} params - 用户添加评分参数
26
+ * @returns {Promise<AddRecipeScoreResponse>} - 用户添加评分结果的 Promise
27
+ */
28
+ export const addRecipeScore = params => {
29
+ const {
30
+ scoreInfo
31
+ } = params,
32
+ rest = _objectWithoutProperties(params, _excluded);
33
+ return requestCloud({
34
+ api: THING + '.m.menu.score.add',
35
+ version: '1.0',
36
+ data: _objectSpread({
37
+ scoreJson: JSON.stringify(scoreInfo)
38
+ }, rest)
39
+ });
40
+ };
41
+
42
+ // #endregion
43
+
44
+ // #region 用户通过食谱 ID 获取评分信息
45
+
46
+ /**
47
+ * GetRecipeScoreByMenuIdParams - 用户通过食谱 ID 获取评分信息参数
48
+ */
49
+
50
+ /**
51
+ * 评分结果
52
+ */
53
+
54
+ /**
55
+ * GetRecipeScoreByMenuIdResponse - 用户通过食谱 ID 获取评分信息响应
56
+ */
57
+
58
+ /**
59
+ * 用户通过食谱 ID 获取评分信息
60
+ * @param {GetRecipeScoreByMenuIdParams} params - 用户获取评分信息参数
61
+ * @returns {Promise<GetRecipeScoreByMenuIdResponse>} - 用户获取评分信息结果的 Promise
62
+ */
63
+ export const getRecipeScoreByMenuId = params => {
64
+ return requestCloud({
65
+ api: THING + '.m.menu.score.get',
66
+ version: '1.0',
67
+ data: params
68
+ });
69
+ };
70
+
71
+ // #endregion
72
+
73
+ // #region 用户通过食谱 IDs 获取评分信息
74
+
75
+ /**
76
+ * QueryCondition - 查询条件
77
+ */
78
+
79
+ /**
80
+ * GetRecipeScoresByMenuIdsParams - 用户通过食谱 IDs 获取评分信息参数
81
+ */
82
+
83
+ /**
84
+ * GetRecipeScoresByMenuIdsResponse - 用户通过食谱 IDs 获取评分信息响应
85
+ */
86
+
87
+ /**
88
+ * 用户通过食谱 IDs 获取评分信息
89
+ * @param {GetRecipeScoresByMenuIdsParams} params - 用户获取评分信息参数
90
+ * @returns {Promise<GetRecipeScoresByMenuIdsResponse>} - 用户获取评分信息结果的 Promise
91
+ */
92
+ export const getRecipeScoresByMenuIds = params => {
93
+ const {
94
+ query
95
+ } = params,
96
+ rest = _objectWithoutProperties(params, _excluded2);
97
+ return requestCloud({
98
+ api: THING + '.m.menu.score.bat.get',
99
+ version: '1.0',
100
+ data: _objectSpread({
101
+ queryJson: JSON.stringify(query)
102
+ }, rest)
103
+ });
104
+ };
105
+
106
+ // #endregion
@@ -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: 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: 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: 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: 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: THING + '.m.menu.star.count',
146
+ version: '1.0',
147
+ data: params
148
+ });
149
+ };
150
+
151
+ // #endregion
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 多语言信息
3
+ */
4
+ declare type LangInfo = {
5
+ lang: string;
6
+ name: string;
7
+ };
File without changes