@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.
Files changed (136) 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/device.d.ts +25 -1
  27. package/lib/cloud/device.js +15 -1
  28. package/lib/cloud/doorlock/README.md +62 -0
  29. package/lib/cloud/doorlock/auth.d.ts +235 -0
  30. package/lib/cloud/doorlock/auth.js +223 -0
  31. package/lib/cloud/doorlock/auth.md +323 -0
  32. package/lib/cloud/doorlock/device.d.ts +137 -0
  33. package/lib/cloud/doorlock/device.js +187 -0
  34. package/lib/cloud/doorlock/device.md +265 -0
  35. package/lib/cloud/doorlock/index.d.ts +10 -0
  36. package/lib/cloud/doorlock/index.js +20 -0
  37. package/lib/cloud/doorlock/log.d.ts +113 -0
  38. package/lib/cloud/doorlock/log.js +53 -0
  39. package/lib/cloud/doorlock/log.md +153 -0
  40. package/lib/cloud/doorlock/member-opmode.d.ts +121 -0
  41. package/lib/cloud/doorlock/member-opmode.js +104 -0
  42. package/lib/cloud/doorlock/member-opmode.md +279 -0
  43. package/lib/cloud/doorlock/member.d.ts +110 -0
  44. package/lib/cloud/doorlock/member.js +72 -0
  45. package/lib/cloud/doorlock/member.md +276 -0
  46. package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
  47. package/lib/cloud/doorlock/offline-pwd.js +67 -0
  48. package/lib/cloud/doorlock/offline-pwd.md +155 -0
  49. package/lib/cloud/doorlock/old.d.ts +36 -0
  50. package/lib/cloud/doorlock/old.js +102 -0
  51. package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
  52. package/lib/cloud/doorlock/temp-pwd.js +193 -0
  53. package/lib/cloud/doorlock/temp-pwd.md +362 -0
  54. package/lib/cloud/doorlock/unlock-method.d.ts +62 -0
  55. package/lib/cloud/doorlock/unlock-method.js +85 -0
  56. package/lib/cloud/doorlock/unlock-method.md +121 -0
  57. package/lib/cloud/doorlock/unlock.d.ts +89 -0
  58. package/lib/cloud/doorlock/unlock.js +76 -0
  59. package/lib/cloud/doorlock/unlock.md +222 -0
  60. package/lib/cloud/index.d.ts +4 -0
  61. package/lib/cloud/index.js +10 -1
  62. package/lib/cloud/interface.d.ts +39 -2
  63. package/lib/cloud/linkage.d.ts +8 -5
  64. package/lib/cloud/linkage.js +30 -9
  65. package/lib/cloud/outdoor.d.ts +15 -0
  66. package/lib/cloud/outdoor.js +25 -0
  67. package/lib/cloud/recipe/README.md +36 -0
  68. package/lib/cloud/recipe/basket.d.ts +220 -0
  69. package/lib/cloud/recipe/basket.js +328 -0
  70. package/lib/cloud/recipe/basket.md +431 -0
  71. package/lib/cloud/recipe/category-list.d.ts +71 -0
  72. package/lib/cloud/recipe/category-list.js +65 -0
  73. package/lib/cloud/recipe/category-list.md +132 -0
  74. package/lib/cloud/recipe/custom.d.ts +177 -0
  75. package/lib/cloud/recipe/custom.js +171 -0
  76. package/lib/cloud/recipe/custom.md +265 -0
  77. package/lib/cloud/recipe/index.d.ts +8 -0
  78. package/lib/cloud/recipe/index.js +8 -0
  79. package/lib/cloud/recipe/menu.d.ts +170 -0
  80. package/lib/cloud/recipe/menu.js +76 -0
  81. package/lib/cloud/recipe/menu.md +276 -0
  82. package/lib/cloud/recipe/query.d.ts +87 -0
  83. package/lib/cloud/recipe/query.js +101 -0
  84. package/lib/cloud/recipe/query.md +112 -0
  85. package/lib/cloud/recipe/record.d.ts +54 -0
  86. package/lib/cloud/recipe/record.js +87 -0
  87. package/lib/cloud/recipe/record.md +115 -0
  88. package/lib/cloud/recipe/score.d.ts +69 -0
  89. package/lib/cloud/recipe/score.js +106 -0
  90. package/lib/cloud/recipe/score.md +112 -0
  91. package/lib/cloud/recipe/star.d.ts +131 -0
  92. package/lib/cloud/recipe/star.js +151 -0
  93. package/lib/cloud/recipe/star.md +196 -0
  94. package/lib/cloud/recipe/types.d.ts +7 -0
  95. package/lib/cloud/recipe/types.js +0 -0
  96. package/lib/cloud/remoteGroup.d.ts +10 -0
  97. package/lib/cloud/remoteGroup.js +31 -0
  98. package/lib/constants.js +1 -1
  99. package/lib/errorCode.d.ts +4 -0
  100. package/lib/errorCode.js +3 -0
  101. package/lib/getCdnUrl/index.d.ts +2 -2
  102. package/lib/getCdnUrl/index.js +1 -2
  103. package/lib/getCdnUrl/index.wechat.d.ts +2 -2
  104. package/lib/getCdnUrl/index.wechat.js +1 -2
  105. package/lib/index.d.ts +1 -0
  106. package/lib/index.js +1 -0
  107. package/lib/nativeRouters/common.d.ts +15 -0
  108. package/lib/nativeRouters/common.js +38 -0
  109. package/lib/nativeRouters/device.d.ts +59 -0
  110. package/lib/nativeRouters/device.js +69 -0
  111. package/lib/nativeRouters/gw.d.ts +23 -0
  112. package/lib/nativeRouters/gw.js +27 -0
  113. package/lib/nativeRouters/index.d.ts +6 -1
  114. package/lib/nativeRouters/index.js +6 -1
  115. package/lib/nativeRouters/ipc.d.ts +30 -0
  116. package/lib/nativeRouters/ipc.js +44 -0
  117. package/lib/nativeRouters/outdoors.d.ts +47 -0
  118. package/lib/nativeRouters/outdoors.js +41 -0
  119. package/lib/nativeRouters/remoteGroup.d.ts +22 -0
  120. package/lib/nativeRouters/remoteGroup.js +11 -0
  121. package/lib/nativeRouters/root.d.ts +41 -0
  122. package/lib/nativeRouters/root.js +53 -0
  123. package/lib/openGroupCreate/index.js +3 -3
  124. package/lib/panel/i18n/index.d.ts +7 -6
  125. package/lib/panel/i18n/index.js +26 -11
  126. package/lib/panel/normalizeNetwork.js +1 -1
  127. package/lib/utils.d.ts +5 -2
  128. package/lib/utils.js +46 -20
  129. package/lib/utils.wechat.d.ts +3 -0
  130. package/lib/utils.wechat.js +17 -1
  131. package/lib/viewAPI.d.ts +1 -0
  132. package/lib/viewAPI.js +4 -3
  133. package/package.json +9 -8
  134. package/@types/PlayNetKit.d.ts +0 -444
  135. package/lib/nativeRouters/scene.d.ts +0 -34
  136. package/lib/nativeRouters/scene.js +0 -60
@@ -0,0 +1,112 @@
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
+ ```
@@ -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: "".concat(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: "".concat(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: "".concat(THING, ".m.menu.query.history.clean"),
82
+ version: '1.0',
83
+ data: params
84
+ });
85
+ }
86
+
87
+ // #endregion
@@ -0,0 +1,115 @@
1
+ ## getSearchHistoryList
2
+
3
+ 获取搜索历史记录列表。
4
+
5
+ ### 引入
6
+
7
+ > @ray-js/ray^1.5.0 以上版本可使用
8
+
9
+ ```js
10
+ import { getSearchHistoryList } from '@ray-js/ray'
11
+ ```
12
+
13
+ **参数**
14
+
15
+ **SearchHistoryListParams params**
16
+
17
+ 封装了获取搜索记录列表的参数对象。
18
+
19
+ **参数属性 SearchHistoryListParams**
20
+
21
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
22
+ | ----- | -------- | ------ | ---- | ------- |
23
+ | devId | `string` | | 是 | 设备 ID |
24
+
25
+ **函数定义示例**
26
+
27
+ ```typescript
28
+ /**
29
+ * 获取搜索历史记录列表
30
+ * @param {SearchHistoryListParams} params - 搜索记录列表参数
31
+ * @returns {Promise<SearchHistoryListResponse>} - 返回获取搜索记录列表结果的 Promise 对象
32
+ */
33
+ export function getSearchHistoryList(
34
+ params: SearchHistoryListParams
35
+ ): Promise<SearchHistoryListResponse>
36
+ ```
37
+
38
+ ---
39
+
40
+ ## deleteSearchHistory
41
+
42
+ 删除单条搜索历史记录。
43
+
44
+ ### 引入
45
+
46
+ > @ray-js/ray^1.5.0 以上版本可使用
47
+
48
+ ```js
49
+ import { deleteSearchHistory } from '@ray-js/ray'
50
+ ```
51
+
52
+ **参数**
53
+
54
+ **DeleteSearchHistoryParams params**
55
+
56
+ 封装了删除单条搜索历史记录的参数对象。
57
+
58
+ **参数属性 DeleteSearchHistoryParams**
59
+
60
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
61
+ | ----- | -------- | ------ | ---- | ------------ |
62
+ | name | `string` | | 是 | 历史记录名称 |
63
+ | devId | `string` | | 是 | 设备 ID |
64
+
65
+ **函数定义示例**
66
+
67
+ ```typescript
68
+ /**
69
+ * 删除单条搜索历史记录
70
+ * @param {DeleteSearchHistoryParams} params - 搜索记录单条删除参数
71
+ * @returns {Promise<DeleteSearchHistoryResponse>} - 返回删除单条搜索历史记录结果的 Promise 对象
72
+ */
73
+ export function deleteSearchHistory(
74
+ params: DeleteSearchHistoryParams
75
+ ): Promise<DeleteSearchHistoryResponse>
76
+ ```
77
+
78
+ ---
79
+
80
+ ## cleanSearchHistory
81
+
82
+ 清空搜索历史记录。
83
+
84
+ ### 引入
85
+
86
+ > @ray-js/ray^1.5.0 以上版本可使用
87
+
88
+ ```js
89
+ import { cleanSearchHistory } from '@ray-js/ray'
90
+ ```
91
+
92
+ **参数**
93
+
94
+ **CleanSearchHistoryParams params**
95
+
96
+ 封装了清空搜索历史记录的参数对象。
97
+
98
+ **参数属性 CleanSearchHistoryParams**
99
+
100
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
101
+ | ----- | -------- | ------ | ---- | ------- |
102
+ | devId | `string` | | 是 | 设备 ID |
103
+
104
+ **函数定义示例**
105
+
106
+ ```typescript
107
+ /**
108
+ * 清空搜索历史记录
109
+ * @param {CleanSearchHistoryParams} params - 搜索记录清空参数
110
+ * @returns {Promise<CleanSearchHistoryResponse>} - 返回清空搜索历史记录结果的 Promise 对象
111
+ */
112
+ export function cleanSearchHistory(
113
+ params: CleanSearchHistoryParams
114
+ ): Promise<CleanSearchHistoryResponse>
115
+ ```
@@ -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: "".concat(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: "".concat(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: "".concat(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,112 @@
1
+ ## addRecipeScore
2
+
3
+ 用户添加评分。
4
+
5
+ ### 引入
6
+
7
+ > @ray-js/ray^1.5.0 以上版本可使用
8
+
9
+ ```js
10
+ import { addRecipeScore } from '@ray-js/ray'
11
+ ```
12
+
13
+ **参数**
14
+
15
+ **AddRecipeScoreParams params**
16
+
17
+ 封装了用户添加评分的参数对象。
18
+
19
+ **参数属性 AddRecipeScoreParams**
20
+
21
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
22
+ | --------- | ----------- | ------ | ---- | -------- |
23
+ | scoreInfo | `ScoreInfo` | | 是 | 评分信息 |
24
+
25
+ **函数定义示例**
26
+
27
+ ```typescript
28
+ /**
29
+ * 用户添加评分
30
+ * @param {AddRecipeScoreParams} params - 用户添加评分参数
31
+ * @returns {Promise<AddRecipeScoreResponse>} - 用户添加评分结果的 Promise 对象
32
+ */
33
+ export const addRecipeScore: (params: AddRecipeScoreParams) => Promise<AddRecipeScoreResponse>
34
+ ```
35
+
36
+ ---
37
+
38
+ ## getRecipeScoreByMenuId
39
+
40
+ 用户通过食谱 ID 获取评分信息。
41
+
42
+ ### 引入
43
+
44
+ > @ray-js/ray^1.5.0 以上版本可使用
45
+
46
+ ```js
47
+ import { getRecipeScoreByMenuId } from '@ray-js/ray'
48
+ ```
49
+
50
+ **参数**
51
+
52
+ **GetRecipeScoreByMenuIdParams params**
53
+
54
+ 封装了用户通过食谱 ID 获取评分信息的参数对象。
55
+
56
+ **参数属性 GetRecipeScoreByMenuIdParams**
57
+
58
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
59
+ | ------ | -------- | ------ | ---- | ------- |
60
+ | menuId | `number` | | 是 | 食谱 ID |
61
+
62
+ **函数定义示例**
63
+
64
+ ```typescript
65
+ /**
66
+ * 用户通过食谱 ID 获取评分信息
67
+ * @param {GetRecipeScoreByMenuIdParams} params - 用户获取评分信息参数
68
+ * @returns {Promise<GetRecipeScoreByMenuIdResponse>} - 用户获取评分信息结果的 Promise 对象
69
+ */
70
+ export const getRecipeScoreByMenuId: (
71
+ params: GetRecipeScoreByMenuIdParams
72
+ ) => Promise<GetRecipeScoreByMenuIdResponse>
73
+ ```
74
+
75
+ ---
76
+
77
+ ## getRecipeScoresByMenuIds
78
+
79
+ 用户通过食谱 IDs 获取评分信息。
80
+
81
+ ### 引入
82
+
83
+ > @ray-js/ray^1.5.0 以上版本可使用
84
+
85
+ ```js
86
+ import { getRecipeScoresByMenuIds } from '@ray-js/ray'
87
+ ```
88
+
89
+ **参数**
90
+
91
+ **GetRecipeScoresByMenuIdsParams params**
92
+
93
+ 封装了用户通过食谱 IDs 获取评分信息的参数对象。
94
+
95
+ **参数属性 GetRecipeScoresByMenuIdsParams**
96
+
97
+ | 属性 | 类型 | 默认值 | 必填 | 说明 |
98
+ | ----- | ---------------- | ------ | ---- | -------- |
99
+ | query | `QueryCondition` | | 是 | 查询条件 |
100
+
101
+ **函数定义示例**
102
+
103
+ ```typescript
104
+ /**
105
+ * 用户通过食谱 IDs 获取评分信息
106
+ * @param {GetRecipeScoresByMenuIdsParams} params - 用户获取评分信息参数
107
+ * @returns {Promise<GetRecipeScoresByMenuIdsResponse>} - 用户获取评分信息结果的 Promise 对象
108
+ */
109
+ export const getRecipeScoresByMenuIds: (
110
+ params: GetRecipeScoresByMenuIdsParams
111
+ ) => Promise<GetRecipeScoresByMenuIdsResponse>
112
+ ```