@freelog/tools-lib 0.1.160 → 0.1.161

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,42 +1,42 @@
1
- import FUtil from '../utils';
2
-
3
- // 列出运营分类分组排序
4
- interface OperationCategoriesParamsType {
5
- name?: string;
6
- status?: number;
7
- }
8
-
9
- export function operationCategories({...params}: OperationCategoriesParamsType = {}) {
10
- return FUtil.Request({
11
- method: 'GET',
12
- url: `/v2/resources/operation-categories/listSimpleByGroup`,
13
- params: params,
14
- });
15
- }
16
-
17
- // 收益排行
18
- interface RecordRankParamsType {
19
- coinAccountType: 1 | 2;
20
- limit: number;
21
- }
22
-
23
- export function recordRank({...params}: RecordRankParamsType) {
24
- return FUtil.Request({
25
- method: 'POST',
26
- url: `/v2/activities/coin/record/rank`,
27
- data: params,
28
- });
29
- }
30
-
31
- // 收益详情
32
- interface RankInfoParamsType {
33
- coinAccountType: 1 | 2;
34
- }
35
-
36
- export function rankInfo({...params}: RankInfoParamsType) {
37
- return FUtil.Request({
38
- method: 'POST',
39
- url: `/v2/activities/coin/record/rankInfo`,
40
- data: params,
41
- });
42
- }
1
+ import FUtil from '../utils';
2
+
3
+ // 列出运营分类分组排序
4
+ interface OperationCategoriesParamsType {
5
+ name?: string;
6
+ status?: number;
7
+ }
8
+
9
+ export function operationCategories({...params}: OperationCategoriesParamsType = {}) {
10
+ return FUtil.Request({
11
+ method: 'GET',
12
+ url: `/v2/resources/operation-categories/listSimpleByGroup`,
13
+ params: params,
14
+ });
15
+ }
16
+
17
+ // 收益排行
18
+ interface RecordRankParamsType {
19
+ coinAccountType: 1 | 2;
20
+ limit: number;
21
+ }
22
+
23
+ export function recordRank({...params}: RecordRankParamsType) {
24
+ return FUtil.Request({
25
+ method: 'POST',
26
+ url: `/v2/activities/coin/record/rank`,
27
+ data: params,
28
+ });
29
+ }
30
+
31
+ // 收益详情
32
+ interface RankInfoParamsType {
33
+ coinAccountType: 1 | 2;
34
+ }
35
+
36
+ export function rankInfo({...params}: RankInfoParamsType) {
37
+ return FUtil.Request({
38
+ method: 'POST',
39
+ url: `/v2/activities/coin/record/rankInfo`,
40
+ data: params,
41
+ });
42
+ }
@@ -21,7 +21,6 @@ export interface CreatePresentableParamsType {
21
21
  }
22
22
 
23
23
  export function createPresentable(params: CreatePresentableParamsType) {
24
- // return FUtil.Axios.post(`/v2/presentables`, params);
25
24
  return FUtil.Request({
26
25
  method: 'POST',
27
26
  url: `/v2/presentables`,
@@ -54,7 +53,6 @@ interface UpdatePresentableParamsType {
54
53
  }
55
54
 
56
55
  export function updatePresentable({presentableId, ...params}: UpdatePresentableParamsType) {
57
- // return FUtil.Axios.put(`/v2/presentables/${presentableId}`, params);
58
56
  return FUtil.Request({
59
57
  method: 'PUT',
60
58
  url: `/v2/presentables/${presentableId}`,
@@ -73,7 +71,6 @@ interface PresentablesOnlineParamsType {
73
71
  }
74
72
 
75
73
  export function presentablesOnlineStatus({presentableId, ...params}: PresentablesOnlineParamsType) {
76
- // return FUtil.Axios.put(`/v2/presentables/${presentableId}/onlineStatus`, params);
77
74
  return FUtil.Request({
78
75
  method: 'PUT',
79
76
  url: `/v2/presentables/${presentableId}/onlineStatus`,
@@ -106,9 +103,6 @@ interface PresentableDetailsParamsType2 {
106
103
 
107
104
  export function presentableDetails(params: PresentableDetailsParamsType1 | PresentableDetailsParamsType2) {
108
105
  if ((params as PresentableDetailsParamsType2).nodeId) {
109
- // return FUtil.Axios.get(`/v2/presentables/detail`, {
110
- // params,
111
- // });
112
106
  return FUtil.Request({
113
107
  method: 'GET',
114
108
  url: `/v2/presentables/detail`,
@@ -116,9 +110,6 @@ export function presentableDetails(params: PresentableDetailsParamsType1 | Prese
116
110
  });
117
111
  }
118
112
  const {presentableId, ...p} = params as PresentableDetailsParamsType1;
119
- // return FUtil.Axios.get(`/v2/presentables/${presentableId}`, {
120
- // params: p,
121
- // });
122
113
  return FUtil.Request({
123
114
  method: 'GET',
124
115
  url: `/v2/presentables/${presentableId}`,
@@ -182,7 +173,6 @@ interface DependencyTreeParamsType {
182
173
  }
183
174
 
184
175
  export function dependencyTree({presentableId, ...params}: DependencyTreeParamsType) {
185
- // return FUtil.Axios.get(`/v2/presentables/${presentableId}/dependencyTree`, {params});
186
176
  return FUtil.Request({
187
177
  method: 'GET',
188
178
  url: `/v2/presentables/${presentableId}/dependencyTree`,
@@ -197,7 +187,6 @@ interface RelationTreeParamsType {
197
187
  }
198
188
 
199
189
  export function relationTree({presentableId, ...params}: RelationTreeParamsType) {
200
- // return FUtil.Axios.get(`/v2/presentables/${presentableId}/relationTree`, {params});
201
190
  return FUtil.Request({
202
191
  method: 'GET',
203
192
  url: `/v2/presentables/${presentableId}/relationTree`,
@@ -215,7 +204,6 @@ interface AuthTreeParamsType {
215
204
  }
216
205
 
217
206
  export function authTree({presentableId, ...params}: AuthTreeParamsType) {
218
- // return FUtil.Axios.get(`/v2/presentables/${presentableId}/authTree`, {params});
219
207
  return FUtil.Request({
220
208
  method: 'GET',
221
209
  url: `/v2/presentables/${presentableId}/authTree`,
@@ -230,7 +218,6 @@ interface PresentablesVersionParamsType {
230
218
  }
231
219
 
232
220
  export function presentablesVersion({presentableId, ...params}: PresentablesVersionParamsType) {
233
- // return FUtil.Axios.put(`/v2/presentables/${presentableId}/version`, params);
234
221
  return FUtil.Request({
235
222
  method: 'PUT',
236
223
  url: `/v2/presentables/${presentableId}/version`,
@@ -249,7 +236,6 @@ interface UpdateRewritePropertyParamsType {
249
236
  }
250
237
 
251
238
  export function updateRewriteProperty({presentableId, ...params}: UpdateRewritePropertyParamsType) {
252
- // return FUtil.Axios.put(`/v2/presentables/${presentableId}/rewriteProperty`, params);
253
239
  return FUtil.Request({
254
240
  method: 'PUT',
255
241
  url: `/v2/presentables/${presentableId}/rewriteProperty`,
@@ -265,9 +251,6 @@ interface BatchAuthParamsType {
265
251
  }
266
252
 
267
253
  export function batchAuth({nodeId, ...params}: BatchAuthParamsType) {
268
- // return FUtil.Axios.get(`/v2/auths/presentables/nodes/${nodeId}/batchAuth/result`, {
269
- // params,
270
- // });
271
254
  return FUtil.Request({
272
255
  method: 'GET',
273
256
  url: `/v2/auths/presentables/nodes/${nodeId}/batchAuth/result`,
@@ -282,12 +265,58 @@ interface ContractAppliedPresentableParamsType {
282
265
  }
283
266
 
284
267
  export function contractAppliedPresentable({nodeId, ...params}: ContractAppliedPresentableParamsType) {
285
- // return FUtil.Axios.get(`/v2/presentables/${nodeId}/contractAppliedPresentable`, {
286
- // params,
287
- // });
288
268
  return FUtil.Request({
289
269
  method: 'GET',
290
270
  url: `/v2/presentables/${nodeId}/contractAppliedPresentable`,
291
271
  params: params,
292
272
  });
293
273
  }
274
+
275
+ // 一键批量创建展品
276
+ export interface BatchCreatePresentableParamsType {
277
+ nodeId: number;
278
+ resources: {
279
+ resourceId: string;
280
+ policyId?: string;
281
+ }[];
282
+ }
283
+
284
+ export function batchCreatePresentable(params: BatchCreatePresentableParamsType) {
285
+ return FUtil.Request({
286
+ method: 'POST',
287
+ url: `/v2/presentables/createPresentableBatchEasy`,
288
+ data: params,
289
+ });
290
+ }
291
+
292
+ // 批量更新展品
293
+ interface BatchUpdatePresentableParamsType {
294
+ presentableIds: string[];
295
+ addPolicies: {
296
+ policyName: string;
297
+ policyText: string;
298
+ status?: 0 | 1;
299
+ }[];
300
+ }
301
+
302
+ export function batchUpdatePresentable({...params}: BatchUpdatePresentableParamsType) {
303
+ return FUtil.Request({
304
+ method: 'PUT',
305
+ url: `/v2/presentables/updatePresentableBatch`,
306
+ data: params,
307
+ });
308
+ }
309
+
310
+ // 批量切换展品上下线状态
311
+ interface BatchUpdatePresentableStatusParamsType {
312
+ presentableIds: string[];
313
+ onlineStatus: 0 | 1;
314
+ }
315
+
316
+ export function batchUpdatePresentableStatus({...params}: BatchUpdatePresentableStatusParamsType) {
317
+ return FUtil.Request({
318
+ method: 'PUT',
319
+ url: `/v2/presentables/updatePresentableOnlineStatusBatch`,
320
+ data: params,
321
+ });
322
+ }