@freelog/tools-lib 0.1.172 → 0.1.174

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,343 +1,495 @@
1
- import FUtil from '../utils';
2
-
3
- // 创建展品
4
- export interface CreatePresentableParamsType {
5
- nodeId: number;
6
- resourceId: string;
7
- version: string;
8
- resolveResources: {
9
- resourceId: string;
10
- contracts: {
11
- policyId: string;
12
- }[];
13
- }[];
14
- presentableName: string;
15
- presentableTitle?: string;
16
- tags?: string[];
17
- policies?: {
18
- policyName: string;
19
- policyText: string;
20
- status?: 0 | 1;
21
- }[];
22
- }
23
-
24
- export function createPresentable(params: CreatePresentableParamsType) {
25
- return FUtil.Request({
26
- method: 'POST',
27
- url: `/v2/presentables`,
28
- data: params,
29
- });
30
- }
31
-
32
- // 更新展品
33
- interface UpdatePresentableParamsType {
34
- presentableId: string;
35
- presentableTitle?: string;
36
- presentableIntro?: string;
37
- tags?: string[];
38
- coverImages?: string[];
39
- addPolicies?: {
40
- policyName: string;
41
- policyText: string;
42
- status?: 0 | 1;
43
- }[];
44
- updatePolicies?: {
45
- policyId: string;
46
- status: 0 | 1;
47
- }[];
48
- resolveResources?: {
49
- resourceId: string;
50
- contracts: {
51
- policyId: string;
52
- }[];
53
- }[];
54
- autoUpdateStatus?: 0 | 1;
55
- }
56
-
57
- export function updatePresentable({presentableId, ...params}: UpdatePresentableParamsType) {
58
- return FUtil.Request({
59
- method: 'PUT',
60
- url: `/v2/presentables/${presentableId}`,
61
- data: params,
62
- });
63
- }
64
-
65
- // 上下线presentable
66
- interface PresentablesOnlineParamsType {
67
- presentableId: string;
68
- onlineStatus: 0 | 1;
69
- updatePolicies?: {
70
- policyId: string;
71
- status: 0 | 1;
72
- }
73
- }
74
-
75
- export function presentablesOnlineStatus({presentableId, ...params}: PresentablesOnlineParamsType) {
76
- return FUtil.Request({
77
- method: 'PUT',
78
- url: `/v2/presentables/${presentableId}/onlineStatus`,
79
- data: params,
80
- });
81
- }
82
-
83
- // 查看展品详情
84
- interface PresentableDetailsParamsType1 {
85
- presentableId: string;
86
- projection?: string;
87
- isLoadVersionProperty?: 0 | 1;
88
- isLoadPolicyInfo?: 0 | 1;
89
- isTranslate?: 0 | 1;
90
- isLoadCustomPropertyDescriptors?: 0 | 1;
91
- isLoadResourceDetailInfo?: 0 | 1;
92
- isLoadResourceVersionInfo?: 0 | 1;
93
- }
94
-
95
- interface PresentableDetailsParamsType2 {
96
- nodeId: number;
97
- resourceId?: string;
98
- resourceName?: string;
99
- presentableName?: string;
100
- projection?: string;
101
- isLoadVersionProperty?: 0 | 1;
102
- isLoadPolicyInfo?: 0 | 1;
103
- isLoadCustomPropertyDescriptors?: 0 | 1;
104
- }
105
-
106
- export function presentableDetails(params: PresentableDetailsParamsType1 | PresentableDetailsParamsType2) {
107
- if ((params as PresentableDetailsParamsType2).nodeId) {
108
- return FUtil.Request({
109
- method: 'GET',
110
- url: `/v2/presentables/detail`,
111
- params: params,
112
- });
113
- }
114
- const {presentableId, ...p} = params as PresentableDetailsParamsType1;
115
- return FUtil.Request({
116
- method: 'GET',
117
- url: `/v2/presentables/${presentableId}`,
118
- params: p,
119
- });
120
- }
121
-
122
- // 查询展品分页列表
123
- interface PresentablesParamsType {
124
- nodeId: number;
125
- skip?: number;
126
- limit?: number;
127
- resourceType?: string;
128
- resourceTypeCode?: string;
129
- omitResourceType?: string;
130
- onlineStatus?: number;
131
- tags?: string;
132
- projection?: string;
133
- keywords?: string;
134
- isLoadVersionProperty?: 0 | 1;
135
- isLoadPolicyInfo?: 0 | 1;
136
- isLoadResourceDetailInfo?: 0 | 1;
137
- isLoadVersionUpdateTip?: 0 | 1;
138
- }
139
-
140
- export function presentables(params: PresentablesParamsType) {
141
- return FUtil.Request({
142
- method: 'GET',
143
- url: `/v2/presentables`,
144
- params: params,
145
- });
146
- }
147
-
148
- // 批量查询展品列表
149
- interface PresentableListParamsType {
150
- nodeId?: number;
151
- userId?: number;
152
- presentableIds?: string;
153
- resourceIds?: string;
154
- resourceNames?: string;
155
- isLoadVersionProperty?: 0 | 1;
156
- isLoadPolicyInfo?: 0 | 1;
157
- isTranslate?: 0 | 1;
158
- projection?: string;
159
- resolveResourceIds?: string;
160
- }
161
-
162
- export function presentableList(params: PresentableListParamsType) {
163
- return FUtil.Request({
164
- method: 'GET',
165
- url: `/v2/presentables/list`,
166
- params: params,
167
- });
168
- }
169
-
170
- // 查看展品依赖树
171
- interface DependencyTreeParamsType {
172
- presentableId: string;
173
- maxDeep?: number;
174
- nid?: string;
175
- isContainRootNode?: boolean;
176
- version?: string;
177
- }
178
-
179
- export function dependencyTree({presentableId, ...params}: DependencyTreeParamsType) {
180
- return FUtil.Request({
181
- method: 'GET',
182
- url: `/v2/presentables/${presentableId}/dependencyTree`,
183
- params: params,
184
- });
185
- }
186
-
187
- // 查看展品关系树
188
- interface RelationTreeParamsType {
189
- presentableId: string;
190
- version?: string;
191
- }
192
-
193
- export function relationTree({presentableId, ...params}: RelationTreeParamsType) {
194
- return FUtil.Request({
195
- method: 'GET',
196
- url: `/v2/presentables/${presentableId}/relationTree`,
197
- params: params,
198
- });
199
- }
200
-
201
- // 查看展品授权树
202
- interface AuthTreeParamsType {
203
- presentableId: string;
204
- maxDeep?: number;
205
- nid?: string;
206
- isContainRootNode?: boolean;
207
- version?: string;
208
- }
209
-
210
- export function authTree({presentableId, ...params}: AuthTreeParamsType) {
211
- return FUtil.Request({
212
- method: 'GET',
213
- url: `/v2/presentables/${presentableId}/authTree`,
214
- params: params,
215
- });
216
- }
217
-
218
- // 切换展品版本
219
- interface PresentablesVersionParamsType {
220
- presentableId: string;
221
- version: string;
222
- }
223
-
224
- export function presentablesVersion({presentableId, ...params}: PresentablesVersionParamsType) {
225
- return FUtil.Request({
226
- method: 'PUT',
227
- url: `/v2/presentables/${presentableId}/version`,
228
- data: params,
229
- });
230
- }
231
-
232
- // 设置展品自定义属性
233
- interface UpdateRewritePropertyParamsType {
234
- presentableId: string;
235
- rewriteProperty: {
236
- key: string;
237
- value: string;
238
- remark: string;
239
- }[];
240
- }
241
-
242
- export function updateRewriteProperty({presentableId, ...params}: UpdateRewritePropertyParamsType) {
243
- return FUtil.Request({
244
- method: 'PUT',
245
- url: `/v2/presentables/${presentableId}/rewriteProperty`,
246
- data: params,
247
- });
248
- }
249
-
250
- // 批量获取展品授权结果
251
- interface BatchAuthParamsType {
252
- nodeId: number;
253
- authType: 1 | 2 | 3; // 1:节点侧授权 2:资源侧授权 3:节点+资源侧授权
254
- presentableIds: string;
255
- }
256
-
257
- export function batchAuth({nodeId, ...params}: BatchAuthParamsType) {
258
- return FUtil.Request({
259
- method: 'GET',
260
- url: `/v2/auths/presentables/nodes/${nodeId}/batchAuth/result`,
261
- params: params,
262
- });
263
- }
264
-
265
- // 查看合约应用的展品列表
266
- interface ContractAppliedPresentableParamsType {
267
- nodeId: number;
268
- contractIds: string;
269
- }
270
-
271
- export function contractAppliedPresentable({nodeId, ...params}: ContractAppliedPresentableParamsType) {
272
- return FUtil.Request({
273
- method: 'GET',
274
- url: `/v2/presentables/${nodeId}/contractAppliedPresentable`,
275
- params: params,
276
- });
277
- }
278
-
279
- // 一键批量创建展品
280
- export interface BatchCreatePresentableParamsType {
281
- nodeId: number;
282
- resources: {
283
- resourceId: string;
284
- policyId?: string;
285
- }[];
286
- }
287
-
288
- export function batchCreatePresentable(params: BatchCreatePresentableParamsType) {
289
- return FUtil.Request({
290
- method: 'POST',
291
- url: `/v2/presentables/createPresentableBatchEasy`,
292
- data: params,
293
- });
294
- }
295
-
296
- // 批量更新展品
297
- interface BatchUpdatePresentableParamsType {
298
- presentableIds: string[];
299
- addPolicies: {
300
- policyName: string;
301
- policyText: string;
302
- status?: 0 | 1;
303
- }[];
304
- }
305
-
306
- export function batchUpdatePresentable({...params}: BatchUpdatePresentableParamsType) {
307
- return FUtil.Request({
308
- method: 'PUT',
309
- url: `/v2/presentables/updatePresentableBatch`,
310
- data: params,
311
- });
312
- }
313
-
314
- // 批量切换展品上下线状态
315
- interface BatchUpdatePresentableStatusParamsType {
316
- presentableIds: string[];
317
- onlineStatus: 0 | 1;
318
- }
319
-
320
- export function batchUpdatePresentableStatus({...params}: BatchUpdatePresentableStatusParamsType) {
321
- return FUtil.Request({
322
- method: 'PUT',
323
- url: `/v2/presentables/updatePresentableOnlineStatusBatch`,
324
- data: params,
325
- });
326
- }
327
-
328
- // 忽略展品更新提醒
329
- interface IgnorePresentableVersionUpdateTipParamsType {
330
- presentableId: string;
331
- ignoreVersion: string;
332
- }
333
-
334
- export function ignorePresentableVersionUpdateTip({
335
- presentableId,
336
- ...params
337
- }: IgnorePresentableVersionUpdateTipParamsType) {
338
- return FUtil.Request({
339
- method: 'POST',
340
- url: `/v2/presentables/${presentableId}/ignorePresentableVersionUpdateTip`,
341
- data: params,
342
- });
343
- }
1
+ import FUtil from '../utils';
2
+
3
+ // 创建展品
4
+ export interface CreatePresentableParamsType {
5
+ nodeId: number;
6
+ resourceId: string;
7
+ version: string;
8
+ // resolveResources: {
9
+ // resourceId: string;
10
+ // contracts: {
11
+ // policyId: string;
12
+ // }[];
13
+ // }[];
14
+ batchSignContracts?: {
15
+ resourceId: string;
16
+ subjectType: number;
17
+ policyIds: string[];
18
+ }[];
19
+ presentableName: string;
20
+ presentableTitle?: string;
21
+ tags?: string[];
22
+ policies?: {
23
+ policyName: string;
24
+ policyText: string;
25
+ status?: 0 | 1;
26
+ }[];
27
+ }
28
+
29
+ export function createPresentable(params: CreatePresentableParamsType) {
30
+ return FUtil.Request({
31
+ method: 'POST',
32
+ url: `/v2/presentables`,
33
+ data: params,
34
+ });
35
+ }
36
+
37
+ // 更新展品
38
+ interface UpdatePresentableParamsType {
39
+ presentableId: string;
40
+ presentableTitle?: string;
41
+ presentableIntro?: string;
42
+ tags?: string[];
43
+ coverImages?: string[];
44
+ addPolicies?: {
45
+ policyName: string;
46
+ policyText: string;
47
+ status?: 0 | 1;
48
+ }[];
49
+ updatePolicies?: {
50
+ policyId: string;
51
+ status: 0 | 1;
52
+ }[];
53
+ resolveResources?: {
54
+ resourceId: string;
55
+ contracts: {
56
+ policyId: string;
57
+ }[];
58
+ }[];
59
+ autoUpdateStatus?: 0 | 1;
60
+ }
61
+
62
+ export function updatePresentable({
63
+ presentableId,
64
+ ...params
65
+ }: UpdatePresentableParamsType) {
66
+ return FUtil.Request({
67
+ method: 'PUT',
68
+ url: `/v2/presentables/${presentableId}`,
69
+ data: params,
70
+ });
71
+ }
72
+
73
+ // 上下线presentable
74
+ interface PresentablesOnlineParamsType {
75
+ presentableId: string;
76
+ onlineStatus: 0 | 1;
77
+ updatePolicies?: {
78
+ policyId: string;
79
+ status: 0 | 1;
80
+ };
81
+ }
82
+
83
+ export function presentablesOnlineStatus({
84
+ presentableId,
85
+ ...params
86
+ }: PresentablesOnlineParamsType) {
87
+ return FUtil.Request({
88
+ method: 'PUT',
89
+ url: `/v2/presentables/${presentableId}/onlineStatus`,
90
+ data: params,
91
+ });
92
+ }
93
+
94
+ // 查看展品详情
95
+ interface PresentableDetailsParamsType1 {
96
+ presentableId: string;
97
+ projection?: string;
98
+ isLoadVersionProperty?: 0 | 1;
99
+ isLoadPolicyInfo?: 0 | 1;
100
+ isTranslate?: 0 | 1;
101
+ isLoadCustomPropertyDescriptors?: 0 | 1;
102
+ isLoadResourceDetailInfo?: 0 | 1;
103
+ isLoadResourceVersionInfo?: 0 | 1;
104
+ }
105
+
106
+ interface PresentableDetailsParamsType2 {
107
+ nodeId: number;
108
+ resourceId?: string;
109
+ resourceName?: string;
110
+ presentableName?: string;
111
+ projection?: string;
112
+ isLoadVersionProperty?: 0 | 1;
113
+ isLoadPolicyInfo?: 0 | 1;
114
+ isLoadCustomPropertyDescriptors?: 0 | 1;
115
+ }
116
+
117
+ export function presentableDetails(
118
+ params: PresentableDetailsParamsType1 | PresentableDetailsParamsType2
119
+ ) {
120
+ if ((params as PresentableDetailsParamsType2).nodeId) {
121
+ return FUtil.Request({
122
+ method: 'GET',
123
+ url: `/v2/presentables/detail`,
124
+ params: params,
125
+ });
126
+ }
127
+ const { presentableId, ...p } = params as PresentableDetailsParamsType1;
128
+ return FUtil.Request({
129
+ method: 'GET',
130
+ url: `/v2/presentables/${presentableId}`,
131
+ params: p,
132
+ });
133
+ }
134
+
135
+ // 查询展品分页列表
136
+ interface PresentablesParamsType {
137
+ nodeId: number;
138
+ skip?: number;
139
+ limit?: number;
140
+ resourceType?: string;
141
+ resourceTypeCode?: string;
142
+ omitResourceType?: string;
143
+ onlineStatus?: number;
144
+ tags?: string;
145
+ projection?: string;
146
+ keywords?: string;
147
+ isLoadVersionProperty?: 0 | 1;
148
+ isLoadPolicyInfo?: 0 | 1;
149
+ isLoadResourceDetailInfo?: 0 | 1;
150
+ isLoadVersionUpdateTip?: 0 | 1;
151
+ }
152
+
153
+ export function presentables(params: PresentablesParamsType) {
154
+ return FUtil.Request({
155
+ method: 'GET',
156
+ url: `/v2/presentables`,
157
+ params: params,
158
+ });
159
+ }
160
+
161
+ // 批量查询展品列表
162
+ interface PresentableListParamsType {
163
+ nodeId?: number;
164
+ userId?: number;
165
+ presentableIds?: string;
166
+ resourceIds?: string;
167
+ resourceNames?: string;
168
+ isLoadVersionProperty?: 0 | 1;
169
+ isLoadPolicyInfo?: 0 | 1;
170
+ isTranslate?: 0 | 1;
171
+ projection?: string;
172
+ resolveResourceIds?: string;
173
+ }
174
+
175
+ export function presentableList(params: PresentableListParamsType) {
176
+ return FUtil.Request({
177
+ method: 'GET',
178
+ url: `/v2/presentables/list`,
179
+ params: params,
180
+ });
181
+ }
182
+
183
+ // 查看展品依赖树
184
+ interface DependencyTreeParamsType {
185
+ presentableId: string;
186
+ maxDeep?: number;
187
+ nid?: string;
188
+ isContainRootNode?: boolean;
189
+ version?: string;
190
+ }
191
+
192
+ export function dependencyTree({
193
+ presentableId,
194
+ ...params
195
+ }: DependencyTreeParamsType) {
196
+ return FUtil.Request({
197
+ method: 'GET',
198
+ url: `/v2/presentables/${presentableId}/dependencyTree`,
199
+ params: params,
200
+ });
201
+ }
202
+
203
+ // 查看展品关系树
204
+ interface RelationTreeParamsType {
205
+ presentableId: string;
206
+ version?: string;
207
+ }
208
+
209
+ export function relationTree({
210
+ presentableId,
211
+ ...params
212
+ }: RelationTreeParamsType) {
213
+ return FUtil.Request({
214
+ method: 'GET',
215
+ url: `/v2/presentables/${presentableId}/relationTree`,
216
+ params: params,
217
+ });
218
+ }
219
+
220
+ // 查看展品授权树
221
+ interface AuthTreeParamsType {
222
+ presentableId: string;
223
+ maxDeep?: number;
224
+ nid?: string;
225
+ isContainRootNode?: boolean;
226
+ version?: string;
227
+ }
228
+
229
+ export function authTree({ presentableId, ...params }: AuthTreeParamsType) {
230
+ return FUtil.Request({
231
+ method: 'GET',
232
+ url: `/v2/presentables/${presentableId}/authTree`,
233
+ params: params,
234
+ });
235
+ }
236
+
237
+ // 切换展品版本
238
+ interface PresentablesVersionParamsType {
239
+ presentableId: string;
240
+ version: string;
241
+ }
242
+
243
+ export function presentablesVersion({
244
+ presentableId,
245
+ ...params
246
+ }: PresentablesVersionParamsType) {
247
+ return FUtil.Request({
248
+ method: 'PUT',
249
+ url: `/v2/presentables/${presentableId}/version`,
250
+ data: params,
251
+ });
252
+ }
253
+
254
+ // 设置展品自定义属性
255
+ interface UpdateRewritePropertyParamsType {
256
+ presentableId: string;
257
+ rewriteProperty: {
258
+ key: string;
259
+ value: string;
260
+ remark: string;
261
+ }[];
262
+ }
263
+
264
+ export function updateRewriteProperty({
265
+ presentableId,
266
+ ...params
267
+ }: UpdateRewritePropertyParamsType) {
268
+ return FUtil.Request({
269
+ method: 'PUT',
270
+ url: `/v2/presentables/${presentableId}/rewriteProperty`,
271
+ data: params,
272
+ });
273
+ }
274
+
275
+ // 批量获取展品授权结果
276
+ interface BatchAuthParamsType {
277
+ nodeId: number;
278
+ authType: 1 | 2 | 3; // 1:节点侧授权 2:资源侧授权 3:节点+资源侧授权
279
+ presentableIds: string;
280
+ }
281
+
282
+ export function batchAuth({ nodeId, ...params }: BatchAuthParamsType) {
283
+ return FUtil.Request({
284
+ method: 'GET',
285
+ url: `/v2/auths/presentables/nodes/${nodeId}/batchAuth/result`,
286
+ params: params,
287
+ });
288
+ }
289
+
290
+ // 查看合约应用的展品列表
291
+ interface ContractAppliedPresentableParamsType {
292
+ nodeId: number;
293
+ contractIds: string;
294
+ }
295
+
296
+ export function contractAppliedPresentable({
297
+ nodeId,
298
+ ...params
299
+ }: ContractAppliedPresentableParamsType) {
300
+ return FUtil.Request({
301
+ method: 'GET',
302
+ url: `/v2/presentables/${nodeId}/contractAppliedPresentable`,
303
+ params: params,
304
+ });
305
+ }
306
+
307
+ // 一键批量创建展品
308
+ export interface BatchCreatePresentableParamsType {
309
+ nodeId: number;
310
+ resources: {
311
+ resourceId: string;
312
+ policyId?: string;
313
+ }[];
314
+ }
315
+
316
+ export function batchCreatePresentable(
317
+ params: BatchCreatePresentableParamsType
318
+ ) {
319
+ return FUtil.Request({
320
+ method: 'POST',
321
+ url: `/v2/presentables/createPresentableBatchEasy`,
322
+ data: params,
323
+ });
324
+ }
325
+
326
+ // 批量更新展品
327
+ interface BatchUpdatePresentableParamsType {
328
+ presentableIds: string[];
329
+ addPolicies: {
330
+ policyName: string;
331
+ policyText: string;
332
+ status?: 0 | 1;
333
+ }[];
334
+ }
335
+
336
+ export function batchUpdatePresentable({
337
+ ...params
338
+ }: BatchUpdatePresentableParamsType) {
339
+ return FUtil.Request({
340
+ method: 'PUT',
341
+ url: `/v2/presentables/updatePresentableBatch`,
342
+ data: params,
343
+ });
344
+ }
345
+
346
+ // 批量切换展品上下线状态
347
+ interface BatchUpdatePresentableStatusParamsType {
348
+ presentableIds: string[];
349
+ onlineStatus: 0 | 1;
350
+ }
351
+
352
+ export function batchUpdatePresentableStatus({
353
+ ...params
354
+ }: BatchUpdatePresentableStatusParamsType) {
355
+ return FUtil.Request({
356
+ method: 'PUT',
357
+ url: `/v2/presentables/updatePresentableOnlineStatusBatch`,
358
+ data: params,
359
+ });
360
+ }
361
+
362
+ // 忽略展品更新提醒
363
+ interface IgnorePresentableVersionUpdateTipParamsType {
364
+ presentableId: string;
365
+ ignoreVersion: string;
366
+ }
367
+
368
+ export function ignorePresentableVersionUpdateTip({
369
+ presentableId,
370
+ ...params
371
+ }: IgnorePresentableVersionUpdateTipParamsType) {
372
+ return FUtil.Request({
373
+ method: 'POST',
374
+ url: `/v2/presentables/${presentableId}/ignorePresentableVersionUpdateTip`,
375
+ data: params,
376
+ });
377
+ }
378
+
379
+ // 创建展品合集
380
+ interface CreatePresentableCollectionParamsType {
381
+ nodeId: number;
382
+ presentableName: string;
383
+ presentableTitle?: string;
384
+ policies?: {
385
+ policyName: string;
386
+ policyText: string;
387
+ status: 0 | 1;
388
+ }[];
389
+ tags?: string[];
390
+ coverImages?: string[];
391
+ }
392
+
393
+ export function createPresentableCollection({
394
+ ...params
395
+ }: CreatePresentableCollectionParamsType) {
396
+ return FUtil.Request({
397
+ method: 'POST',
398
+ url: `/v2/presentables/catalogues`,
399
+ data: params,
400
+ });
401
+ }
402
+
403
+ // 批量为展品合集添加单品
404
+ interface AddItemsToPresentableCollectionParamsType {
405
+ presentableId: string;
406
+ addCollectionItems: {
407
+ presentableId: string;
408
+ }[];
409
+ }
410
+
411
+ export function addItemsToPresentableCollection({
412
+ presentableId,
413
+ ...params
414
+ }: AddItemsToPresentableCollectionParamsType) {
415
+ return FUtil.Request({
416
+ method: 'POST',
417
+ url: `/v2/presentables/catalogues/${presentableId}/items`,
418
+ data: params,
419
+ });
420
+ }
421
+
422
+ // 批量从展品合集中移除单品
423
+ interface RemoveItemsFromPresentableCollectionParamsType {
424
+ presentableId: string;
425
+ removeCollectionItemIds: string;
426
+ }
427
+
428
+ export function removeItemsFromPresentableCollection({
429
+ presentableId,
430
+ ...params
431
+ }: RemoveItemsFromPresentableCollectionParamsType) {
432
+ return FUtil.Request({
433
+ method: 'DELETE',
434
+ url: `/v2/presentables/catalogues/${presentableId}/items`,
435
+ params: params,
436
+ });
437
+ }
438
+
439
+ // 查询展品合集中的单品分页列表
440
+ interface GetItemsFromPresentableCollectionParamsType {
441
+ presentableId: string;
442
+ isLoadLatestVersionInfo?: 0 | 1;
443
+ skip?: number;
444
+ limit?: number;
445
+ keywords?: number;
446
+ sortField?: 'createDate' | 'sortId';
447
+ sortType?: -1 | 1;
448
+ }
449
+
450
+ export function getItemsFromPresentableCollection({
451
+ presentableId,
452
+ ...params
453
+ }: GetItemsFromPresentableCollectionParamsType) {
454
+ return FUtil.Request({
455
+ method: 'GET',
456
+ url: `/v2/presentables/catalogues/${presentableId}/items`,
457
+ params: params,
458
+ });
459
+ }
460
+
461
+ // 设置展品合集中的单品排序-手动排序
462
+ interface SetItemsSortFromPresentableCollectionManualParamsType {
463
+ presentableId: string;
464
+ sortIds: string[];
465
+ targetSortId: number;
466
+ }
467
+
468
+ export function setItemsSortFromPresentableCollectionManual({
469
+ presentableId,
470
+ ...params
471
+ }: SetItemsSortFromPresentableCollectionManualParamsType) {
472
+ return FUtil.Request({
473
+ method: 'PUT',
474
+ url: `/v2/presentables/catalogues/${presentableId}/manualSort`,
475
+ data: params,
476
+ });
477
+ }
478
+
479
+ // 设置展品合集中的单品排序-快速排序
480
+ interface SetItemsSortFromPresentableCollectionQuickParamsType {
481
+ presentableId: string;
482
+ sortIds: string[];
483
+ targetSortId: number;
484
+ }
485
+
486
+ export function setItemsSortFromPresentableCollectionQuick({
487
+ presentableId,
488
+ ...params
489
+ }: SetItemsSortFromPresentableCollectionQuickParamsType) {
490
+ return FUtil.Request({
491
+ method: 'PUT',
492
+ url: `/v2/presentables/catalogues/${presentableId}/manualSort`,
493
+ data: params,
494
+ });
495
+ }