@freelog/tools-lib 0.1.162 → 0.1.165
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/i18n/I18nNext.d.ts +1 -0
- package/dist/service-API/index.d.ts +2 -0
- package/dist/service-API/nodes.d.ts +5 -0
- package/dist/service-API/presentables.d.ts +9 -0
- package/dist/service-API/resourceType.d.ts +10 -0
- package/dist/service-API/resources.d.ts +196 -1
- package/dist/service-API/storages.d.ts +6 -0
- package/dist/tools-lib.cjs.development.js +1208 -1232
- 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 +1208 -1232
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/linkTo.d.ts +49 -5
- package/package.json +1 -1
- package/src/service-API/index.ts +2 -0
- package/src/service-API/nodes.ts +113 -99
- package/src/service-API/presentables.ts +343 -322
- package/src/service-API/resourceType.ts +29 -0
- package/src/service-API/resources.ts +417 -1
- package/src/service-API/storages.ts +418 -403
- package/src/utils/linkTo.ts +594 -479
package/dist/utils/linkTo.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ interface ResourceDetailsParamsType {
|
|
|
27
27
|
version?: string;
|
|
28
28
|
}
|
|
29
29
|
export declare function resourceDetails({ resourceID, ...params }: ResourceDetailsParamsType): TReturnType;
|
|
30
|
+
interface CollectionDetailsParamsType {
|
|
31
|
+
collectionID: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function collectionDetails({ collectionID }: CollectionDetailsParamsType): TReturnType;
|
|
30
34
|
interface ResourceCreatorParamsType {
|
|
31
35
|
}
|
|
32
36
|
export declare function resourceCreatorEntry({}?: ResourceCreatorParamsType): TReturnType;
|
|
@@ -36,12 +40,23 @@ export declare function resourceCreator({}?: ResourceCreatorParamsType): TReturn
|
|
|
36
40
|
interface ResourceCreatorParamsType {
|
|
37
41
|
}
|
|
38
42
|
export declare function resourceCreatorBatch({}?: ResourceCreatorParamsType): TReturnType;
|
|
43
|
+
interface CollectionCreatorParamsType {
|
|
44
|
+
}
|
|
45
|
+
export declare function collectionCreator({}?: CollectionCreatorParamsType): TReturnType;
|
|
39
46
|
interface MyResourcesParamsType {
|
|
40
47
|
}
|
|
41
48
|
export declare function myResources({}?: MyResourcesParamsType): TReturnType;
|
|
49
|
+
interface MyCollectionsParamsType {
|
|
50
|
+
}
|
|
51
|
+
export declare function myCollections({}?: MyCollectionsParamsType): TReturnType;
|
|
42
52
|
interface MyCollectsParamsType {
|
|
43
53
|
}
|
|
44
54
|
export declare function myCollects({}?: MyCollectsParamsType): TReturnType;
|
|
55
|
+
interface ResourceVersionInfoParamsType {
|
|
56
|
+
resourceID: string;
|
|
57
|
+
version?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function resourceVersionInfo({ resourceID, version }: ResourceVersionInfoParamsType): TReturnType;
|
|
45
60
|
interface ResourceInfoParamsType {
|
|
46
61
|
resourceID: string;
|
|
47
62
|
}
|
|
@@ -62,11 +77,26 @@ interface ResourceVersionCreatorParamsType {
|
|
|
62
77
|
resourceID: string;
|
|
63
78
|
}
|
|
64
79
|
export declare function resourceVersionCreator({ resourceID }: ResourceVersionCreatorParamsType): TReturnType;
|
|
65
|
-
interface
|
|
66
|
-
|
|
67
|
-
version?: string;
|
|
80
|
+
interface CollectionVersionInfoParamsType {
|
|
81
|
+
collectionID: string;
|
|
68
82
|
}
|
|
69
|
-
export declare function
|
|
83
|
+
export declare function collectionVersionInfo({ collectionID }: CollectionVersionInfoParamsType): TReturnType;
|
|
84
|
+
interface CollectionInfoParamsType {
|
|
85
|
+
collectionID: string;
|
|
86
|
+
}
|
|
87
|
+
export declare function collectionInfo({ collectionID }: CollectionInfoParamsType): TReturnType;
|
|
88
|
+
interface CollectionPolicyParamsType {
|
|
89
|
+
collectionID: string;
|
|
90
|
+
}
|
|
91
|
+
export declare function collectionPolicy({ collectionID }: CollectionPolicyParamsType): TReturnType;
|
|
92
|
+
interface CollectionContractParamsType {
|
|
93
|
+
collectionID: string;
|
|
94
|
+
}
|
|
95
|
+
export declare function collectionContract({ collectionID }: CollectionContractParamsType): TReturnType;
|
|
96
|
+
interface CollectionDependencyParamsType {
|
|
97
|
+
collectionID: string;
|
|
98
|
+
}
|
|
99
|
+
export declare function collectionDependency({ collectionID }: CollectionDependencyParamsType): TReturnType;
|
|
70
100
|
interface NodeCreatorParamsType {
|
|
71
101
|
}
|
|
72
102
|
export declare function nodeCreator({}?: NodeCreatorParamsType): TReturnType;
|
|
@@ -78,8 +108,14 @@ export declare function nodeManagement({ nodeID, showPage, ...params }: NodeMana
|
|
|
78
108
|
interface ExhibitManagementParamsType {
|
|
79
109
|
exhibitID: string;
|
|
80
110
|
openAuthDrawer?: boolean;
|
|
111
|
+
showMoreSetting?: boolean;
|
|
81
112
|
}
|
|
82
|
-
export declare function exhibitManagement({ exhibitID,
|
|
113
|
+
export declare function exhibitManagement({ exhibitID, ...params }: ExhibitManagementParamsType): TReturnType;
|
|
114
|
+
interface CollectionExhibitManagementParamsType {
|
|
115
|
+
exhibitID: string;
|
|
116
|
+
openAuthDrawer?: boolean;
|
|
117
|
+
}
|
|
118
|
+
export declare function collectionExhibitManagement({ exhibitID, openAuthDrawer }: CollectionExhibitManagementParamsType): TReturnType;
|
|
83
119
|
interface InformNodeManagementParamsType {
|
|
84
120
|
nodeID: number;
|
|
85
121
|
showPage?: 'exhibit' | 'theme' | 'mappingRule';
|
|
@@ -99,6 +135,10 @@ interface ObjectDetailsParamsType {
|
|
|
99
135
|
objectID: string;
|
|
100
136
|
}
|
|
101
137
|
export declare function objectDetails({ ...params }: ObjectDetailsParamsType): TReturnType;
|
|
138
|
+
interface CollectionCreateSuccessParamsType {
|
|
139
|
+
collectionID: string;
|
|
140
|
+
}
|
|
141
|
+
export declare function collectionCreateSuccess({ collectionID }: CollectionCreateSuccessParamsType): string;
|
|
102
142
|
interface ResourceCreateSuccessParamsType {
|
|
103
143
|
resourceID: string;
|
|
104
144
|
}
|
|
@@ -126,6 +166,10 @@ interface Exception403ParamsType {
|
|
|
126
166
|
from?: string;
|
|
127
167
|
}
|
|
128
168
|
export declare function exception403({ ...params }?: Exception403ParamsType): string;
|
|
169
|
+
interface ExceptionUnableToAccessParamsType {
|
|
170
|
+
from?: string;
|
|
171
|
+
}
|
|
172
|
+
export declare function exceptionUnableToAccess({ ...params }?: ExceptionUnableToAccessParamsType): string;
|
|
129
173
|
interface NodeFreezeParamsType {
|
|
130
174
|
nodeID: number;
|
|
131
175
|
}
|
package/package.json
CHANGED
package/src/service-API/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ import * as I18n from './i18n';
|
|
|
16
16
|
import * as Policy from './policies';
|
|
17
17
|
import * as recombination from './recombinations';
|
|
18
18
|
import * as Operation from './operation';
|
|
19
|
+
import * as ResourceType from './resourceType';
|
|
19
20
|
|
|
20
21
|
const FServiceAPI = {
|
|
21
22
|
Node,
|
|
@@ -36,6 +37,7 @@ const FServiceAPI = {
|
|
|
36
37
|
Policy,
|
|
37
38
|
recombination,
|
|
38
39
|
Operation,
|
|
40
|
+
ResourceType,
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
export default FServiceAPI;
|
package/src/service-API/nodes.ts
CHANGED
|
@@ -1,99 +1,113 @@
|
|
|
1
|
-
import FUtil from '../utils';
|
|
2
|
-
|
|
3
|
-
// 创建节点
|
|
4
|
-
export interface CreateParamsType {
|
|
5
|
-
nodeName: string;
|
|
6
|
-
nodeDomain: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return FUtil.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return FUtil.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
1
|
+
import FUtil from '../utils';
|
|
2
|
+
|
|
3
|
+
// 创建节点
|
|
4
|
+
export interface CreateParamsType {
|
|
5
|
+
nodeName: string;
|
|
6
|
+
nodeDomain: string;
|
|
7
|
+
nodeTitle: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function create(params: CreateParamsType) {
|
|
11
|
+
// return FUtil.Axios.post('/v2/nodes', params);
|
|
12
|
+
return FUtil.Request({
|
|
13
|
+
method: 'POST',
|
|
14
|
+
url: `/v2/nodes`,
|
|
15
|
+
data: params,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 查看节点详情
|
|
20
|
+
interface NodeDetailParamsType1 {
|
|
21
|
+
nodeId: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface NodeDetailParamsType2 {
|
|
25
|
+
nodeName?: string;
|
|
26
|
+
nodeDomain?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function details(params: NodeDetailParamsType1 | NodeDetailParamsType2) {
|
|
30
|
+
if ((params as NodeDetailParamsType1).nodeId) {
|
|
31
|
+
// return FUtil.Axios.get(`/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`);
|
|
32
|
+
return FUtil.Request({
|
|
33
|
+
method: 'GET',
|
|
34
|
+
url: `/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`,
|
|
35
|
+
// params: params,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
// return FUtil.Axios.get(`/v2/nodes/detail`, {
|
|
39
|
+
// params,
|
|
40
|
+
// });
|
|
41
|
+
return FUtil.Request({
|
|
42
|
+
method: 'GET',
|
|
43
|
+
url: `/v2/nodes/detail`,
|
|
44
|
+
params: params,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 查看节点列表
|
|
49
|
+
interface NodesParamsType {
|
|
50
|
+
skip?: number;
|
|
51
|
+
limit?: number;
|
|
52
|
+
status?: 0 | 1 | 2; // 0:正常 1:未审核 2:冻结
|
|
53
|
+
projection?: string;
|
|
54
|
+
nodeType?: 0 | 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function nodes(params: NodesParamsType) {
|
|
58
|
+
return FUtil.Request({
|
|
59
|
+
method: 'GET',
|
|
60
|
+
url: `/v2/nodes`,
|
|
61
|
+
params: params,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 示例节点
|
|
66
|
+
interface SearchForClientParamsType {
|
|
67
|
+
skip?: number;
|
|
68
|
+
limit?: number;
|
|
69
|
+
status?: 0 | 1 | 2; // 0:正常 1:未审核 2:冻结
|
|
70
|
+
projection?: string;
|
|
71
|
+
nodeType?: 0 | 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function searchForClient(params: SearchForClientParamsType) {
|
|
75
|
+
return FUtil.Request({
|
|
76
|
+
method: 'GET',
|
|
77
|
+
url: `/v2/nodes/searchForClient`,
|
|
78
|
+
params: params,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// 设置节点信息
|
|
83
|
+
interface SetNodeInfoParamsType {
|
|
84
|
+
nodeId: number;
|
|
85
|
+
nodeLogo: string;
|
|
86
|
+
nodeTitle: string;
|
|
87
|
+
nodeShortDescription: string;
|
|
88
|
+
// nodeVisibility: 1 | 2 | 3; // 可见性 1:公开 2:私密 3:暂停
|
|
89
|
+
status: 1 | 2 | 8; // 可见性 1:公开 2:私密 3:暂停
|
|
90
|
+
nodeSuspendInfo: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function setNodeInfo(params: SetNodeInfoParamsType) {
|
|
94
|
+
return FUtil.Request({
|
|
95
|
+
method: 'POST',
|
|
96
|
+
url: `/v2/nodes/setNodeInfo`,
|
|
97
|
+
data: params,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// 删除节点
|
|
102
|
+
interface DeleteNodeParamsType {
|
|
103
|
+
nodeId: number;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function deleteNode({nodeId}: DeleteNodeParamsType) {
|
|
107
|
+
return FUtil.Request({
|
|
108
|
+
method: 'DELETE',
|
|
109
|
+
url: `/v2/nodes/${nodeId}`,
|
|
110
|
+
// params: params,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|