@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.
@@ -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 ResourceVersionInfoParamsType {
66
- resourceID: string;
67
- version?: string;
80
+ interface CollectionVersionInfoParamsType {
81
+ collectionID: string;
68
82
  }
69
- export declare function resourceVersionInfo({ resourceID, version }: ResourceVersionInfoParamsType): TReturnType;
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, openAuthDrawer }: ExhibitManagementParamsType): TReturnType;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freelog/tools-lib",
3
- "version": "0.1.162",
3
+ "version": "0.1.165",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -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;
@@ -1,99 +1,113 @@
1
- import FUtil from '../utils';
2
-
3
- // 创建节点
4
- export interface CreateParamsType {
5
- nodeName: string;
6
- nodeDomain: string;
7
- }
8
-
9
- export function create(params: CreateParamsType) {
10
- // return FUtil.Axios.post('/v2/nodes', params);
11
- return FUtil.Request({
12
- method: 'POST',
13
- url: `/v2/nodes`,
14
- data: params,
15
- });
16
- }
17
-
18
- // 查看节点详情
19
- interface NodeDetailParamsType1 {
20
- nodeId: number;
21
- }
22
-
23
- interface NodeDetailParamsType2 {
24
- nodeName?: string;
25
- nodeDomain?: string;
26
- }
27
-
28
- export function details(params: NodeDetailParamsType1 | NodeDetailParamsType2) {
29
- if ((params as NodeDetailParamsType1).nodeId) {
30
- // return FUtil.Axios.get(`/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`);
31
- return FUtil.Request({
32
- method: 'GET',
33
- url: `/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`,
34
- // params: params,
35
- });
36
- }
37
- // return FUtil.Axios.get(`/v2/nodes/detail`, {
38
- // params,
39
- // });
40
- return FUtil.Request({
41
- method: 'GET',
42
- url: `/v2/nodes/detail`,
43
- params: params,
44
- });
45
- }
46
-
47
- // 查看节点列表
48
- interface NodesParamsType {
49
- skip?: number;
50
- limit?: number;
51
- status?: 0 | 1 | 2; // 0:正常 1:未审核 2:冻结
52
- projection?: string;
53
- nodeType?: 0 | 1;
54
- }
55
-
56
- export function nodes(params: NodesParamsType) {
57
- return FUtil.Request({
58
- method: 'GET',
59
- url: `/v2/nodes`,
60
- params: params,
61
- });
62
- }
63
-
64
- // 示例节点
65
- interface SearchForClientParamsType {
66
- skip?: number;
67
- limit?: number;
68
- status?: 0 | 1 | 2; // 0:正常 1:未审核 2:冻结
69
- projection?: string;
70
- nodeType?: 0 | 1;
71
- }
72
-
73
- export function searchForClient(params: SearchForClientParamsType) {
74
- return FUtil.Request({
75
- method: 'GET',
76
- url: `/v2/nodes/searchForClient`,
77
- params: params,
78
- });
79
- }
80
-
81
- // 设置节点信息
82
- interface SetNodeInfoParamsType {
83
- nodeId: number;
84
- nodeLogo: string;
85
- nodeTitle: string;
86
- nodeShortDescription: string;
87
- // nodeVisibility: 1 | 2 | 3; // 可见性 1:公开 2:私密 3:暂停
88
- status: 1 | 2 | 8; // 可见性 1:公开 2:私密 3:暂停
89
- nodeSuspendInfo: string;
90
- }
91
-
92
- export function setNodeInfo(params: SetNodeInfoParamsType) {
93
- return FUtil.Request({
94
- method: 'POST',
95
- url: `/v2/nodes/setNodeInfo`,
96
- data: params,
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
+