@ray-js/api 1.4.62 → 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.
- package/lib/cloud/device.js +1 -1
- package/lib/cloud/doorlock/README.md +3 -0
- package/lib/cloud/doorlock/auth.d.ts +235 -0
- package/lib/cloud/doorlock/auth.js +223 -0
- package/lib/cloud/doorlock/device.d.ts +137 -0
- package/lib/cloud/doorlock/device.js +187 -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/member-opmode.d.ts +121 -0
- package/lib/cloud/doorlock/member-opmode.js +104 -0
- package/lib/cloud/doorlock/member.d.ts +110 -0
- package/lib/cloud/doorlock/member.js +72 -0
- package/lib/cloud/doorlock/offline-pwd.d.ts +61 -0
- package/lib/cloud/doorlock/offline-pwd.js +67 -0
- package/lib/cloud/{doorlock.js → doorlock/old.js} +3 -2
- package/lib/cloud/doorlock/temp-pwd.d.ts +194 -0
- package/lib/cloud/doorlock/temp-pwd.js +193 -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.d.ts +89 -0
- package/lib/cloud/doorlock/unlock.js +76 -0
- package/lib/cloud/index.d.ts +3 -1
- package/lib/cloud/index.js +7 -4
- package/lib/cloud/interface.d.ts +26 -0
- package/lib/cloud/recipe/basket.d.ts +220 -0
- package/lib/cloud/recipe/basket.js +328 -0
- package/lib/cloud/recipe/category-list.d.ts +71 -0
- package/lib/cloud/recipe/category-list.js +65 -0
- package/lib/cloud/recipe/custom.d.ts +177 -0
- package/lib/cloud/recipe/custom.js +172 -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/query.d.ts +87 -0
- package/lib/cloud/recipe/query.js +101 -0
- package/lib/cloud/recipe/record.d.ts +54 -0
- package/lib/cloud/recipe/record.js +87 -0
- package/lib/cloud/recipe/score.d.ts +69 -0
- package/lib/cloud/recipe/score.js +106 -0
- package/lib/cloud/recipe/star.d.ts +131 -0
- package/lib/cloud/recipe/star.js +151 -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/nativeRouters/index.d.ts +1 -0
- package/lib/nativeRouters/index.js +2 -1
- package/lib/nativeRouters/remoteGroup.d.ts +22 -0
- package/lib/nativeRouters/remoteGroup.js +11 -0
- package/package.json +5 -5
- /package/lib/cloud/{doorlock.d.ts → doorlock/old.d.ts} +0 -0
@@ -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
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { IGetZigbeeLocalGroupDeviceList, IGetZigbeeLocalGroupRelation } from './interface';
|
2
|
+
/**
|
3
|
+
* 获取 Zigbee 遥控器群组 localId 列表
|
4
|
+
*/
|
5
|
+
declare const getZigbeeLocalGroupRelation: (params: IGetZigbeeLocalGroupRelation) => Promise<string>;
|
6
|
+
/**
|
7
|
+
* 获取可以加入 Zigbee 遥控器群组的设备列表
|
8
|
+
*/
|
9
|
+
declare const getZigbeeLocalGroupDeviceList: (params: IGetZigbeeLocalGroupDeviceList) => Promise<string>;
|
10
|
+
export { getZigbeeLocalGroupRelation, getZigbeeLocalGroupDeviceList };
|
@@ -0,0 +1,31 @@
|
|
1
|
+
// 遥控器群组接口
|
2
|
+
import { requestCloud } from '../';
|
3
|
+
import { THING } from '../constants';
|
4
|
+
/**
|
5
|
+
* 获取 Zigbee 遥控器群组 localId 列表
|
6
|
+
*/
|
7
|
+
const getZigbeeLocalGroupRelation = params => {
|
8
|
+
return requestCloud({
|
9
|
+
api: "".concat(THING, ".p.remote.local.relation.get"),
|
10
|
+
version: '1.0',
|
11
|
+
data: {
|
12
|
+
devId: params.devId,
|
13
|
+
type: 0
|
14
|
+
}
|
15
|
+
});
|
16
|
+
};
|
17
|
+
|
18
|
+
/**
|
19
|
+
* 获取可以加入 Zigbee 遥控器群组的设备列表
|
20
|
+
*/
|
21
|
+
const getZigbeeLocalGroupDeviceList = params => {
|
22
|
+
return requestCloud({
|
23
|
+
api: "".concat(THING, ".m.device.group.dev.list"),
|
24
|
+
version: '1.0',
|
25
|
+
data: params,
|
26
|
+
extData: {
|
27
|
+
gid: params.homeId
|
28
|
+
}
|
29
|
+
});
|
30
|
+
};
|
31
|
+
export { getZigbeeLocalGroupRelation, getZigbeeLocalGroupDeviceList };
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ICommon } from './common';
|
2
|
+
type OpenZigbeeLocalGroupParams = {
|
3
|
+
/**
|
4
|
+
* 设备 ID
|
5
|
+
*/
|
6
|
+
deviceId: string;
|
7
|
+
/**
|
8
|
+
* localId 群组本地标识
|
9
|
+
*/
|
10
|
+
localId: string;
|
11
|
+
/**
|
12
|
+
* categoryCode 并非三级品类,与 localId 匹配范围为 7001-7008;
|
13
|
+
* localId 为云端分配,步长为 8,因此一个遥控器内部最多支持关联 8 个群组,localId 为初始值依次+1,与之匹配的 categoryCode 从 7001 依次 +1.
|
14
|
+
*/
|
15
|
+
categoryCode: string;
|
16
|
+
/**
|
17
|
+
* 二级品类 code,用于进行设备列表筛选过滤
|
18
|
+
*/
|
19
|
+
codes: string;
|
20
|
+
} & ICommon;
|
21
|
+
export declare function openZigbeeLocalGroup(params?: OpenZigbeeLocalGroupParams): Promise<void>;
|
22
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import { nativeRouter } from './common';
|
3
|
+
export function openZigbeeLocalGroup(params) {
|
4
|
+
const realParams = _objectSpread({}, params);
|
5
|
+
// 统一成 TTT 的 deviceId 写法,但实际入参为 devId
|
6
|
+
if (params.deviceId) {
|
7
|
+
realParams.devId = params.deviceId;
|
8
|
+
delete realParams.deviceId;
|
9
|
+
}
|
10
|
+
return nativeRouter('zigbee_pair', realParams);
|
11
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.63",
|
4
4
|
"description": "Ray universal api",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -29,14 +29,14 @@
|
|
29
29
|
"watch": "ray start --type=component"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@ray-js/framework": "1.4.
|
33
|
-
"@ray-js/router": "1.4.
|
32
|
+
"@ray-js/framework": "1.4.63",
|
33
|
+
"@ray-js/router": "1.4.63",
|
34
34
|
"@ray-js/wechat": "^0.2.8",
|
35
35
|
"base64-browser": "^1.0.1",
|
36
36
|
"query-string": "^7.1.3"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@ray-js/cli": "1.4.
|
39
|
+
"@ray-js/cli": "1.4.63",
|
40
40
|
"art-template": "^4.13.2",
|
41
41
|
"fs-extra": "^10.1.0",
|
42
42
|
"miniprogram-api-typings": "^3.12.2",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"access": "public",
|
47
47
|
"registry": "https://registry.npmjs.org"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "4934e503e3fcb057df92eb42c7f7fd84f1d31e60"
|
50
50
|
}
|
File without changes
|