@freelog/tools-lib 0.1.157 → 0.1.160
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/dist/service-API/contracts.d.ts +10 -0
- package/dist/service-API/resources.d.ts +65 -0
- package/dist/service-API/storages.d.ts +10 -0
- package/dist/tools-lib.cjs.development.js +186 -120
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +186 -120
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/linkTo.d.ts +10 -1
- package/package.json +1 -1
- package/src/service-API/contracts.ts +20 -1
- package/src/service-API/presentables.ts +293 -293
- package/src/service-API/resources.ts +746 -645
- package/src/service-API/storages.ts +391 -362
- package/src/utils/axios.ts +1 -1
- package/src/utils/format.ts +1 -1
- package/src/utils/linkTo.ts +23 -2
- package/src/utils/tools.ts +102 -102
package/dist/utils/linkTo.d.ts
CHANGED
|
@@ -29,7 +29,13 @@ interface ResourceDetailsParamsType {
|
|
|
29
29
|
export declare function resourceDetails({ resourceID, ...params }: ResourceDetailsParamsType): TReturnType;
|
|
30
30
|
interface ResourceCreatorParamsType {
|
|
31
31
|
}
|
|
32
|
+
export declare function resourceCreatorEntry({}?: ResourceCreatorParamsType): TReturnType;
|
|
33
|
+
interface ResourceCreatorParamsType {
|
|
34
|
+
}
|
|
32
35
|
export declare function resourceCreator({}?: ResourceCreatorParamsType): TReturnType;
|
|
36
|
+
interface ResourceCreatorParamsType {
|
|
37
|
+
}
|
|
38
|
+
export declare function resourceCreatorBatch({}?: ResourceCreatorParamsType): TReturnType;
|
|
33
39
|
interface MyResourcesParamsType {
|
|
34
40
|
}
|
|
35
41
|
export declare function myResources({}?: MyResourcesParamsType): TReturnType;
|
|
@@ -166,8 +172,11 @@ interface RewardParamsType {
|
|
|
166
172
|
}
|
|
167
173
|
export declare function reward({}?: RewardParamsType): string;
|
|
168
174
|
interface ContractParamsType {
|
|
175
|
+
identityType?: 1 | 2;
|
|
176
|
+
licensorName?: string;
|
|
177
|
+
licenseeName?: string;
|
|
169
178
|
}
|
|
170
|
-
export declare function contract({}?: ContractParamsType): string;
|
|
179
|
+
export declare function contract({ ...params }?: ContractParamsType): string;
|
|
171
180
|
interface SettingParamsType {
|
|
172
181
|
}
|
|
173
182
|
export declare function setting({}?: SettingParamsType): string;
|
package/package.json
CHANGED
|
@@ -52,13 +52,15 @@ export function contractDetails({contractId, ...params}: ContractDetailsParamsTy
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
//
|
|
55
|
+
// 查看合同分页列表
|
|
56
56
|
interface ContractsParamsType {
|
|
57
57
|
skip?: number;
|
|
58
58
|
limit?: number;
|
|
59
59
|
identityType: 1 | 2;
|
|
60
60
|
licensorId?: string;
|
|
61
|
+
licensorName?: string;
|
|
61
62
|
licenseeId?: string;
|
|
63
|
+
licenseeName?: string;
|
|
62
64
|
subjectIds?: string;
|
|
63
65
|
subjectType?: 1 | 2 | 3;
|
|
64
66
|
isDefault?: number;
|
|
@@ -82,6 +84,23 @@ export function contracts(params: ContractsParamsType) {
|
|
|
82
84
|
});
|
|
83
85
|
}
|
|
84
86
|
|
|
87
|
+
// 查询合约授权方搜索建议
|
|
88
|
+
interface KeywordSuggestParamsType {
|
|
89
|
+
identityType: 1 | 2;
|
|
90
|
+
prefix: string;
|
|
91
|
+
prefixType: 1 | 2;
|
|
92
|
+
startDate?: string;
|
|
93
|
+
endDate?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function keywordSuggest(params: KeywordSuggestParamsType) {
|
|
97
|
+
return FUtil.Request({
|
|
98
|
+
method: 'GET',
|
|
99
|
+
url: `/v2/contracts/keywordSuggest`,
|
|
100
|
+
params: params,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
85
104
|
// 批量查询合同列表
|
|
86
105
|
interface BatchContractsParamsType {
|
|
87
106
|
contractIds?: string;
|
|
@@ -1,293 +1,293 @@
|
|
|
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
|
-
tags?: string[];
|
|
16
|
-
policies?: {
|
|
17
|
-
policyName: string;
|
|
18
|
-
policyText: string;
|
|
19
|
-
status?: 0 | 1;
|
|
20
|
-
}[];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function createPresentable(params: CreatePresentableParamsType) {
|
|
24
|
-
// return FUtil.Axios.post(`/v2/presentables`, params);
|
|
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
|
-
}
|
|
55
|
-
|
|
56
|
-
export function updatePresentable({presentableId, ...params}: UpdatePresentableParamsType) {
|
|
57
|
-
// return FUtil.Axios.put(`/v2/presentables/${presentableId}`, params);
|
|
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.Axios.put(`/v2/presentables/${presentableId}/onlineStatus`, params);
|
|
77
|
-
return FUtil.Request({
|
|
78
|
-
method: 'PUT',
|
|
79
|
-
url: `/v2/presentables/${presentableId}/onlineStatus`,
|
|
80
|
-
data: params,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// 查看展品详情
|
|
85
|
-
interface PresentableDetailsParamsType1 {
|
|
86
|
-
presentableId: string;
|
|
87
|
-
projection?: string;
|
|
88
|
-
isLoadVersionProperty?: 0 | 1;
|
|
89
|
-
isLoadPolicyInfo?: 0 | 1;
|
|
90
|
-
isTranslate?: 0 | 1;
|
|
91
|
-
isLoadCustomPropertyDescriptors?: 0 | 1;
|
|
92
|
-
isLoadResourceDetailInfo?: 0 | 1;
|
|
93
|
-
isLoadResourceVersionInfo?: 0 | 1;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
interface PresentableDetailsParamsType2 {
|
|
97
|
-
nodeId: number;
|
|
98
|
-
resourceId?: string;
|
|
99
|
-
resourceName?: string;
|
|
100
|
-
presentableName?: string;
|
|
101
|
-
projection?: string;
|
|
102
|
-
isLoadVersionProperty?: 0 | 1;
|
|
103
|
-
isLoadPolicyInfo?: 0 | 1;
|
|
104
|
-
isLoadCustomPropertyDescriptors?: 0 | 1;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export function presentableDetails(params: PresentableDetailsParamsType1 | PresentableDetailsParamsType2) {
|
|
108
|
-
if ((params as PresentableDetailsParamsType2).nodeId) {
|
|
109
|
-
// return FUtil.Axios.get(`/v2/presentables/detail`, {
|
|
110
|
-
// params,
|
|
111
|
-
// });
|
|
112
|
-
return FUtil.Request({
|
|
113
|
-
method: 'GET',
|
|
114
|
-
url: `/v2/presentables/detail`,
|
|
115
|
-
params: params,
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
const {presentableId, ...p} = params as PresentableDetailsParamsType1;
|
|
119
|
-
// return FUtil.Axios.get(`/v2/presentables/${presentableId}`, {
|
|
120
|
-
// params: p,
|
|
121
|
-
// });
|
|
122
|
-
return FUtil.Request({
|
|
123
|
-
method: 'GET',
|
|
124
|
-
url: `/v2/presentables/${presentableId}`,
|
|
125
|
-
params: p,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// 查询展品分页列表
|
|
130
|
-
interface PresentablesParamsType {
|
|
131
|
-
nodeId: number;
|
|
132
|
-
skip?: number;
|
|
133
|
-
limit?: number;
|
|
134
|
-
resourceType?: string;
|
|
135
|
-
resourceTypeCode?: string;
|
|
136
|
-
omitResourceType?: string;
|
|
137
|
-
onlineStatus?: number;
|
|
138
|
-
tags?: string;
|
|
139
|
-
projection?: string;
|
|
140
|
-
keywords?: string;
|
|
141
|
-
isLoadVersionProperty?: 0 | 1;
|
|
142
|
-
isLoadPolicyInfo?: 0 | 1;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export function presentables(params: PresentablesParamsType) {
|
|
146
|
-
return FUtil.Request({
|
|
147
|
-
method: 'GET',
|
|
148
|
-
url: `/v2/presentables`,
|
|
149
|
-
params: params,
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// 批量查询展品列表
|
|
154
|
-
interface PresentableListParamsType {
|
|
155
|
-
nodeId?: number;
|
|
156
|
-
userId?: number;
|
|
157
|
-
presentableIds?: string;
|
|
158
|
-
resourceIds?: string;
|
|
159
|
-
resourceNames?: string;
|
|
160
|
-
isLoadVersionProperty?: 0 | 1;
|
|
161
|
-
isLoadPolicyInfo?: 0 | 1;
|
|
162
|
-
isTranslate?: 0 | 1;
|
|
163
|
-
projection?: string;
|
|
164
|
-
resolveResourceIds?: string;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export function presentableList(params: PresentableListParamsType) {
|
|
168
|
-
return FUtil.Request({
|
|
169
|
-
method: 'GET',
|
|
170
|
-
url: `/v2/presentables/list`,
|
|
171
|
-
params: params,
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// 查看展品依赖树
|
|
176
|
-
interface DependencyTreeParamsType {
|
|
177
|
-
presentableId: string;
|
|
178
|
-
maxDeep?: number;
|
|
179
|
-
nid?: string;
|
|
180
|
-
isContainRootNode?: boolean;
|
|
181
|
-
version?: string;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export function dependencyTree({presentableId, ...params}: DependencyTreeParamsType) {
|
|
185
|
-
// return FUtil.Axios.get(`/v2/presentables/${presentableId}/dependencyTree`, {params});
|
|
186
|
-
return FUtil.Request({
|
|
187
|
-
method: 'GET',
|
|
188
|
-
url: `/v2/presentables/${presentableId}/dependencyTree`,
|
|
189
|
-
params: params,
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// 查看展品关系树
|
|
194
|
-
interface RelationTreeParamsType {
|
|
195
|
-
presentableId: string;
|
|
196
|
-
version?: string;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export function relationTree({presentableId, ...params}: RelationTreeParamsType) {
|
|
200
|
-
// return FUtil.Axios.get(`/v2/presentables/${presentableId}/relationTree`, {params});
|
|
201
|
-
return FUtil.Request({
|
|
202
|
-
method: 'GET',
|
|
203
|
-
url: `/v2/presentables/${presentableId}/relationTree`,
|
|
204
|
-
params: params,
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// 查看展品授权树
|
|
209
|
-
interface AuthTreeParamsType {
|
|
210
|
-
presentableId: string;
|
|
211
|
-
maxDeep?: number;
|
|
212
|
-
nid?: string;
|
|
213
|
-
isContainRootNode?: boolean;
|
|
214
|
-
version?: string;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export function authTree({presentableId, ...params}: AuthTreeParamsType) {
|
|
218
|
-
// return FUtil.Axios.get(`/v2/presentables/${presentableId}/authTree`, {params});
|
|
219
|
-
return FUtil.Request({
|
|
220
|
-
method: 'GET',
|
|
221
|
-
url: `/v2/presentables/${presentableId}/authTree`,
|
|
222
|
-
params: params,
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// 切换展品版本
|
|
227
|
-
interface PresentablesVersionParamsType {
|
|
228
|
-
presentableId: string;
|
|
229
|
-
version: string;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export function presentablesVersion({presentableId, ...params}: PresentablesVersionParamsType) {
|
|
233
|
-
// return FUtil.Axios.put(`/v2/presentables/${presentableId}/version`, params);
|
|
234
|
-
return FUtil.Request({
|
|
235
|
-
method: 'PUT',
|
|
236
|
-
url: `/v2/presentables/${presentableId}/version`,
|
|
237
|
-
data: params,
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// 设置展品自定义属性
|
|
242
|
-
interface UpdateRewritePropertyParamsType {
|
|
243
|
-
presentableId: string;
|
|
244
|
-
rewriteProperty: {
|
|
245
|
-
key: string;
|
|
246
|
-
value: string;
|
|
247
|
-
remark: string;
|
|
248
|
-
}[];
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
export function updateRewriteProperty({presentableId, ...params}: UpdateRewritePropertyParamsType) {
|
|
252
|
-
// return FUtil.Axios.put(`/v2/presentables/${presentableId}/rewriteProperty`, params);
|
|
253
|
-
return FUtil.Request({
|
|
254
|
-
method: 'PUT',
|
|
255
|
-
url: `/v2/presentables/${presentableId}/rewriteProperty`,
|
|
256
|
-
data: params,
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// 批量获取展品授权结果
|
|
261
|
-
interface BatchAuthParamsType {
|
|
262
|
-
nodeId: number;
|
|
263
|
-
authType: 1 | 2 | 3; // 1:节点侧授权 2:资源侧授权 3:节点+资源侧授权
|
|
264
|
-
presentableIds: string;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export function batchAuth({nodeId, ...params}: BatchAuthParamsType) {
|
|
268
|
-
// return FUtil.Axios.get(`/v2/auths/presentables/nodes/${nodeId}/batchAuth/result`, {
|
|
269
|
-
// params,
|
|
270
|
-
// });
|
|
271
|
-
return FUtil.Request({
|
|
272
|
-
method: 'GET',
|
|
273
|
-
url: `/v2/auths/presentables/nodes/${nodeId}/batchAuth/result`,
|
|
274
|
-
params: params,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// 查看合约应用的展品列表
|
|
279
|
-
interface ContractAppliedPresentableParamsType {
|
|
280
|
-
nodeId: number;
|
|
281
|
-
contractIds: string;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export function contractAppliedPresentable({nodeId, ...params}: ContractAppliedPresentableParamsType) {
|
|
285
|
-
// return FUtil.Axios.get(`/v2/presentables/${nodeId}/contractAppliedPresentable`, {
|
|
286
|
-
// params,
|
|
287
|
-
// });
|
|
288
|
-
return FUtil.Request({
|
|
289
|
-
method: 'GET',
|
|
290
|
-
url: `/v2/presentables/${nodeId}/contractAppliedPresentable`,
|
|
291
|
-
params: params,
|
|
292
|
-
});
|
|
293
|
-
}
|
|
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
|
+
tags?: string[];
|
|
16
|
+
policies?: {
|
|
17
|
+
policyName: string;
|
|
18
|
+
policyText: string;
|
|
19
|
+
status?: 0 | 1;
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function createPresentable(params: CreatePresentableParamsType) {
|
|
24
|
+
// return FUtil.Axios.post(`/v2/presentables`, params);
|
|
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
|
+
}
|
|
55
|
+
|
|
56
|
+
export function updatePresentable({presentableId, ...params}: UpdatePresentableParamsType) {
|
|
57
|
+
// return FUtil.Axios.put(`/v2/presentables/${presentableId}`, params);
|
|
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.Axios.put(`/v2/presentables/${presentableId}/onlineStatus`, params);
|
|
77
|
+
return FUtil.Request({
|
|
78
|
+
method: 'PUT',
|
|
79
|
+
url: `/v2/presentables/${presentableId}/onlineStatus`,
|
|
80
|
+
data: params,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// 查看展品详情
|
|
85
|
+
interface PresentableDetailsParamsType1 {
|
|
86
|
+
presentableId: string;
|
|
87
|
+
projection?: string;
|
|
88
|
+
isLoadVersionProperty?: 0 | 1;
|
|
89
|
+
isLoadPolicyInfo?: 0 | 1;
|
|
90
|
+
isTranslate?: 0 | 1;
|
|
91
|
+
isLoadCustomPropertyDescriptors?: 0 | 1;
|
|
92
|
+
isLoadResourceDetailInfo?: 0 | 1;
|
|
93
|
+
isLoadResourceVersionInfo?: 0 | 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface PresentableDetailsParamsType2 {
|
|
97
|
+
nodeId: number;
|
|
98
|
+
resourceId?: string;
|
|
99
|
+
resourceName?: string;
|
|
100
|
+
presentableName?: string;
|
|
101
|
+
projection?: string;
|
|
102
|
+
isLoadVersionProperty?: 0 | 1;
|
|
103
|
+
isLoadPolicyInfo?: 0 | 1;
|
|
104
|
+
isLoadCustomPropertyDescriptors?: 0 | 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function presentableDetails(params: PresentableDetailsParamsType1 | PresentableDetailsParamsType2) {
|
|
108
|
+
if ((params as PresentableDetailsParamsType2).nodeId) {
|
|
109
|
+
// return FUtil.Axios.get(`/v2/presentables/detail`, {
|
|
110
|
+
// params,
|
|
111
|
+
// });
|
|
112
|
+
return FUtil.Request({
|
|
113
|
+
method: 'GET',
|
|
114
|
+
url: `/v2/presentables/detail`,
|
|
115
|
+
params: params,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
const {presentableId, ...p} = params as PresentableDetailsParamsType1;
|
|
119
|
+
// return FUtil.Axios.get(`/v2/presentables/${presentableId}`, {
|
|
120
|
+
// params: p,
|
|
121
|
+
// });
|
|
122
|
+
return FUtil.Request({
|
|
123
|
+
method: 'GET',
|
|
124
|
+
url: `/v2/presentables/${presentableId}`,
|
|
125
|
+
params: p,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// 查询展品分页列表
|
|
130
|
+
interface PresentablesParamsType {
|
|
131
|
+
nodeId: number;
|
|
132
|
+
skip?: number;
|
|
133
|
+
limit?: number;
|
|
134
|
+
resourceType?: string;
|
|
135
|
+
resourceTypeCode?: string;
|
|
136
|
+
omitResourceType?: string;
|
|
137
|
+
onlineStatus?: number;
|
|
138
|
+
tags?: string;
|
|
139
|
+
projection?: string;
|
|
140
|
+
keywords?: string;
|
|
141
|
+
isLoadVersionProperty?: 0 | 1;
|
|
142
|
+
isLoadPolicyInfo?: 0 | 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function presentables(params: PresentablesParamsType) {
|
|
146
|
+
return FUtil.Request({
|
|
147
|
+
method: 'GET',
|
|
148
|
+
url: `/v2/presentables`,
|
|
149
|
+
params: params,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// 批量查询展品列表
|
|
154
|
+
interface PresentableListParamsType {
|
|
155
|
+
nodeId?: number;
|
|
156
|
+
userId?: number;
|
|
157
|
+
presentableIds?: string;
|
|
158
|
+
resourceIds?: string;
|
|
159
|
+
resourceNames?: string;
|
|
160
|
+
isLoadVersionProperty?: 0 | 1;
|
|
161
|
+
isLoadPolicyInfo?: 0 | 1;
|
|
162
|
+
isTranslate?: 0 | 1;
|
|
163
|
+
projection?: string;
|
|
164
|
+
resolveResourceIds?: string;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function presentableList(params: PresentableListParamsType) {
|
|
168
|
+
return FUtil.Request({
|
|
169
|
+
method: 'GET',
|
|
170
|
+
url: `/v2/presentables/list`,
|
|
171
|
+
params: params,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// 查看展品依赖树
|
|
176
|
+
interface DependencyTreeParamsType {
|
|
177
|
+
presentableId: string;
|
|
178
|
+
maxDeep?: number;
|
|
179
|
+
nid?: string;
|
|
180
|
+
isContainRootNode?: boolean;
|
|
181
|
+
version?: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function dependencyTree({presentableId, ...params}: DependencyTreeParamsType) {
|
|
185
|
+
// return FUtil.Axios.get(`/v2/presentables/${presentableId}/dependencyTree`, {params});
|
|
186
|
+
return FUtil.Request({
|
|
187
|
+
method: 'GET',
|
|
188
|
+
url: `/v2/presentables/${presentableId}/dependencyTree`,
|
|
189
|
+
params: params,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// 查看展品关系树
|
|
194
|
+
interface RelationTreeParamsType {
|
|
195
|
+
presentableId: string;
|
|
196
|
+
version?: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export function relationTree({presentableId, ...params}: RelationTreeParamsType) {
|
|
200
|
+
// return FUtil.Axios.get(`/v2/presentables/${presentableId}/relationTree`, {params});
|
|
201
|
+
return FUtil.Request({
|
|
202
|
+
method: 'GET',
|
|
203
|
+
url: `/v2/presentables/${presentableId}/relationTree`,
|
|
204
|
+
params: params,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// 查看展品授权树
|
|
209
|
+
interface AuthTreeParamsType {
|
|
210
|
+
presentableId: string;
|
|
211
|
+
maxDeep?: number;
|
|
212
|
+
nid?: string;
|
|
213
|
+
isContainRootNode?: boolean;
|
|
214
|
+
version?: string;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function authTree({presentableId, ...params}: AuthTreeParamsType) {
|
|
218
|
+
// return FUtil.Axios.get(`/v2/presentables/${presentableId}/authTree`, {params});
|
|
219
|
+
return FUtil.Request({
|
|
220
|
+
method: 'GET',
|
|
221
|
+
url: `/v2/presentables/${presentableId}/authTree`,
|
|
222
|
+
params: params,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// 切换展品版本
|
|
227
|
+
interface PresentablesVersionParamsType {
|
|
228
|
+
presentableId: string;
|
|
229
|
+
version: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export function presentablesVersion({presentableId, ...params}: PresentablesVersionParamsType) {
|
|
233
|
+
// return FUtil.Axios.put(`/v2/presentables/${presentableId}/version`, params);
|
|
234
|
+
return FUtil.Request({
|
|
235
|
+
method: 'PUT',
|
|
236
|
+
url: `/v2/presentables/${presentableId}/version`,
|
|
237
|
+
data: params,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// 设置展品自定义属性
|
|
242
|
+
interface UpdateRewritePropertyParamsType {
|
|
243
|
+
presentableId: string;
|
|
244
|
+
rewriteProperty: {
|
|
245
|
+
key: string;
|
|
246
|
+
value: string;
|
|
247
|
+
remark: string;
|
|
248
|
+
}[];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export function updateRewriteProperty({presentableId, ...params}: UpdateRewritePropertyParamsType) {
|
|
252
|
+
// return FUtil.Axios.put(`/v2/presentables/${presentableId}/rewriteProperty`, params);
|
|
253
|
+
return FUtil.Request({
|
|
254
|
+
method: 'PUT',
|
|
255
|
+
url: `/v2/presentables/${presentableId}/rewriteProperty`,
|
|
256
|
+
data: params,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// 批量获取展品授权结果
|
|
261
|
+
interface BatchAuthParamsType {
|
|
262
|
+
nodeId: number;
|
|
263
|
+
authType: 1 | 2 | 3; // 1:节点侧授权 2:资源侧授权 3:节点+资源侧授权
|
|
264
|
+
presentableIds: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export function batchAuth({nodeId, ...params}: BatchAuthParamsType) {
|
|
268
|
+
// return FUtil.Axios.get(`/v2/auths/presentables/nodes/${nodeId}/batchAuth/result`, {
|
|
269
|
+
// params,
|
|
270
|
+
// });
|
|
271
|
+
return FUtil.Request({
|
|
272
|
+
method: 'GET',
|
|
273
|
+
url: `/v2/auths/presentables/nodes/${nodeId}/batchAuth/result`,
|
|
274
|
+
params: params,
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// 查看合约应用的展品列表
|
|
279
|
+
interface ContractAppliedPresentableParamsType {
|
|
280
|
+
nodeId: number;
|
|
281
|
+
contractIds: string;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export function contractAppliedPresentable({nodeId, ...params}: ContractAppliedPresentableParamsType) {
|
|
285
|
+
// return FUtil.Axios.get(`/v2/presentables/${nodeId}/contractAppliedPresentable`, {
|
|
286
|
+
// params,
|
|
287
|
+
// });
|
|
288
|
+
return FUtil.Request({
|
|
289
|
+
method: 'GET',
|
|
290
|
+
url: `/v2/presentables/${nodeId}/contractAppliedPresentable`,
|
|
291
|
+
params: params,
|
|
292
|
+
});
|
|
293
|
+
}
|