@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.
@@ -1,115 +0,0 @@
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
- ```
@@ -1,112 +0,0 @@
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
- ```
@@ -1,196 +0,0 @@
1
- ## getRecipeCollectionList
2
-
3
- 获取食谱收藏列表。
4
-
5
- ### 引入
6
-
7
- > @ray-js/ray^1.5.0 以上版本可使用
8
-
9
- ```js
10
- import { getRecipeCollectionList } from '@ray-js/ray'
11
- ```
12
-
13
- **参数**
14
-
15
- **GetRecipeCollectionListParams params**
16
-
17
- 封装了获取食谱收藏列表的查询条件和设备 ID。
18
-
19
- **参数属性 GetRecipeCollectionListParams**
20
-
21
- | 属性 | 类型 | 默认值 | 必填 | 说明 |
22
- | ----- | ------------------------------ | ------ | ---- | -------- |
23
- | query | `GetRecipeCollectionListQuery` | | 是 | 查询条件 |
24
- | devId | `string` | | 是 | 设备 ID |
25
-
26
- **函数定义示例**
27
-
28
- ```typescript
29
- /**
30
- * 获取食谱收藏列表
31
- * @param {GetRecipeCollectionListParams} params - 获取食谱收藏列表请求参数
32
- * @returns {Promise<GetRecipeCollectionListResponse>} - 获取食谱收藏列表响应的 Promise 对象
33
- */
34
- export const getRecipeCollectionList: (
35
- params: GetRecipeCollectionListParams
36
- ) => Promise<GetRecipeCollectionListResponse>
37
- ```
38
-
39
- ---
40
-
41
- ## addRecipeToFavorites
42
-
43
- 添加食谱收藏。
44
-
45
- ### 引入
46
-
47
- > @ray-js/ray^1.5.0 以上版本可使用
48
-
49
- ```js
50
- import { addRecipeToFavorites } from '@ray-js/ray'
51
- ```
52
-
53
- **参数**
54
-
55
- **AddRecipeToFavoritesParams params**
56
-
57
- 封装了食谱 ID 和设备 ID。
58
-
59
- **参数属性 AddRecipeToFavoritesParams**
60
-
61
- | 属性 | 类型 | 默认值 | 必填 | 说明 |
62
- | ------ | -------- | ------ | ---- | ------- |
63
- | menuId | `number` | | 是 | 食谱 ID |
64
- | devId | `string` | | 是 | 设备 ID |
65
-
66
- **函数定义示例**
67
-
68
- ```typescript
69
- /**
70
- * 添加食谱收藏
71
- * @param {AddRecipeToFavoritesParams} params - 添加食谱收藏参数
72
- * @returns {Promise<AddRecipeToFavoritesResponse>} - 添加食谱收藏结果的 Promise 对象
73
- */
74
- export const addRecipeToFavorites: (
75
- params: AddRecipeToFavoritesParams
76
- ) => Promise<AddRecipeToFavoritesResponse>
77
- ```
78
-
79
- ---
80
-
81
- ## removeRecipeFromFavorites
82
-
83
- 取消食谱收藏。
84
-
85
- ### 引入
86
-
87
- > @ray-js/ray^1.5.0 以上版本可使用
88
-
89
- ```js
90
- import { removeRecipeFromFavorites } from '@ray-js/ray'
91
- ```
92
-
93
- **参数**
94
-
95
- **RemoveRecipeFromFavoritesParams params**
96
-
97
- 封装了食谱 ID 和设备 ID。
98
-
99
- **参数属性 RemoveRecipeFromFavoritesParams**
100
-
101
- | 属性 | 类型 | 默认值 | 必填 | 说明 |
102
- | ------ | -------- | ------ | ---- | ------- |
103
- | menuId | `number` | | 是 | 食谱 ID |
104
- | devId | `string` | | 是 | 设备 ID |
105
-
106
- **函数定义示例**
107
-
108
- ```typescript
109
- /**
110
- * 取消食谱收藏
111
- * @param {RemoveRecipeFromFavoritesParams} params - 取消食谱收藏参数
112
- * @returns {Promise<RemoveRecipeFromFavoritesResponse>} - 取消食谱收藏结果的 Promise 对象
113
- */
114
- export const removeRecipeFromFavorites: (
115
- params: RemoveRecipeFromFavoritesParams
116
- ) => Promise<RemoveRecipeFromFavoritesResponse>
117
- ```
118
-
119
- ---
120
-
121
- ## checkRecipeIsStarred
122
-
123
- 查询食谱是否收藏。
124
-
125
- ### 引入
126
-
127
- > @ray-js/ray^1.5.0 以上版本可使用
128
-
129
- ```js
130
- import { checkRecipeIsStarred } from '@ray-js/ray'
131
- ```
132
-
133
- **参数**
134
-
135
- **CheckRecipeIsStarredParams params**
136
-
137
- 封装了食谱 ID 和设备 ID。
138
-
139
- **参数属性 CheckRecipeIsStarredParams**
140
-
141
- | 属性 | 类型 | 默认值 | 必填 | 说明 |
142
- | ------ | -------- | ------ | ---- | ------- |
143
- | menuId | `number` | | 是 | 食谱 ID |
144
- | devId | `string` | | 是 | 设备 ID |
145
-
146
- **函数定义示例**
147
-
148
- ```typescript
149
- /**
150
- * 查询食谱是否收藏
151
- * @param {CheckRecipeIsStarredParams} params - 查询食谱是否收藏参数
152
- * @returns {Promise<CheckRecipeIsStarredResponse>} - 查询食谱是否收藏结果的 Promise 对象
153
- */
154
- export const checkRecipeIsStarred: (
155
- params: CheckRecipeIsStarredParams
156
- ) => Promise<CheckRecipeIsStarredResponse>
157
- ```
158
-
159
- ---
160
-
161
- ## getRecipeStarCount
162
-
163
- 查询用户已收藏的食谱数量。
164
-
165
- ### 引入
166
-
167
- > @ray-js/ray^1.5.0 以上版本可使用
168
-
169
- ```js
170
- import { getRecipeStarCount } from '@ray-js/ray'
171
- ```
172
-
173
- **参数**
174
-
175
- **GetRecipeStarCountParams params**
176
-
177
- 封装了设备 ID。
178
-
179
- **参数属性 GetRecipeStarCountParams**
180
-
181
- | 属性 | 类型 | 默认值 | 必填 | 说明 |
182
- | ----- | -------- | ------ | ---- | ------- |
183
- | devId | `string` | | 是 | 设备 ID |
184
-
185
- **函数定义示例**
186
-
187
- ```typescript
188
- /**
189
- * 查询用户已收藏的食谱数量
190
- * @param {GetRecipeStarCountParams} params - 查询食谱收藏数量参数
191
- * @returns {Promise<GetRecipeStarCountResponse>} - 查询食谱收藏数量结果的 Promise 对象
192
- */
193
- export const getRecipeStarCount: (
194
- params: GetRecipeStarCountParams
195
- ) => Promise<GetRecipeStarCountResponse>
196
- ```