@freelog/tools-lib 0.1.148 → 0.1.151

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.
@@ -7,6 +7,7 @@ interface CollectionResourcesParamsType {
7
7
  limit?: number;
8
8
  keywords?: string;
9
9
  resourceType?: string;
10
+ resourceTypeCode?: string;
10
11
  omitResourceType?: string;
11
12
  resourceStatus?: 0 | 1 | 2 | 4;
12
13
  }
@@ -15,6 +15,7 @@ import * as Statistic from './statistics';
15
15
  import * as I18n from './i18n';
16
16
  import * as Policy from './policies';
17
17
  import * as recombination from './recombinations';
18
+ import * as Operation from './operation';
18
19
  declare const FServiceAPI: {
19
20
  Node: typeof Node;
20
21
  Exhibit: typeof Exhibit;
@@ -33,5 +34,6 @@ declare const FServiceAPI: {
33
34
  I18n: typeof I18n;
34
35
  Policy: typeof Policy;
35
36
  recombination: typeof recombination;
37
+ Operation: typeof Operation;
36
38
  };
37
39
  export default FServiceAPI;
@@ -18,4 +18,13 @@ interface NodesParamsType {
18
18
  projection?: string;
19
19
  }
20
20
  export declare function nodes(params: NodesParamsType): Promise<any>;
21
+ interface SetNodeInfoParamsType {
22
+ nodeId: number;
23
+ nodeLogo: string;
24
+ nodeTitle: string;
25
+ nodeShortDescription: string;
26
+ status: 1 | 2 | 8;
27
+ nodeSuspendInfo: string;
28
+ }
29
+ export declare function setNodeInfo(params: SetNodeInfoParamsType): Promise<any>;
21
30
  export {};
@@ -0,0 +1,5 @@
1
+ interface OperationCategoriesParamsType {
2
+ name?: string;
3
+ }
4
+ export declare function operationCategories({ ...params }?: OperationCategoriesParamsType): Promise<any>;
5
+ export {};
@@ -74,6 +74,7 @@ interface PresentablesParamsType {
74
74
  skip?: number;
75
75
  limit?: number;
76
76
  resourceType?: string;
77
+ resourceTypeCode?: string;
77
78
  omitResourceType?: string;
78
79
  onlineStatus?: number;
79
80
  tags?: string;
@@ -7,8 +7,9 @@ interface FileInfo {
7
7
  }
8
8
  interface GetFileInfosBySha1Params {
9
9
  sha1: string[];
10
+ resourceTypeCode: string;
10
11
  }
11
- export declare function getFilesSha1Info({ sha1 }: GetFileInfosBySha1Params, cdPartially?: (s: any[]) => void): Promise<{
12
+ export declare function getFilesSha1Info({ sha1, resourceTypeCode }: GetFileInfosBySha1Params, cdPartially?: (s: any[]) => void): Promise<{
12
13
  error: string;
13
14
  result: FileInfo[];
14
15
  }>;
@@ -29,7 +29,8 @@ interface IResourceInfo {
29
29
  }
30
30
  export interface CreateParamsType {
31
31
  name: string;
32
- resourceType: string[];
32
+ resourceTypeCode: string;
33
+ resourceTypeName?: string;
33
34
  policies?: any[];
34
35
  coverImages?: string[];
35
36
  intro?: string;
@@ -58,6 +59,7 @@ interface ListParamsType {
58
59
  limit?: number;
59
60
  keywords?: string;
60
61
  resourceType?: string;
62
+ resourceTypeCode?: string;
61
63
  omitResourceType?: string;
62
64
  isSelf?: 0 | 1;
63
65
  userId?: number;
@@ -70,6 +72,7 @@ interface ListParamsType {
70
72
  endCreateDate?: string;
71
73
  tags?: string;
72
74
  sort?: string;
75
+ operationCategoryCode?: string;
73
76
  }
74
77
  export declare function list(params: ListParamsType): Promise<any>;
75
78
  interface InfoParamsType {
@@ -122,6 +125,7 @@ interface CreateVersionParamsType {
122
125
  }[];
123
126
  customPropertyDescriptors?: {
124
127
  key: string;
128
+ name: string;
125
129
  defaultValue: string;
126
130
  type: 'editableText' | 'readonlyText' | 'radio' | 'checkbox' | 'select';
127
131
  candidateItems?: string[];
@@ -165,6 +169,7 @@ interface UpdateResourceVersionInfoParamsType {
165
169
  description?: string;
166
170
  customPropertyDescriptors?: {
167
171
  key: string;
172
+ name: string;
168
173
  defaultValue: string;
169
174
  type: 'editableText' | 'readonlyText' | 'radio' | 'checkbox' | 'select';
170
175
  candidateItems?: string[];
@@ -270,4 +275,25 @@ interface AvailableTagsParamsType {
270
275
  resourceType: string;
271
276
  }
272
277
  export declare function availableTags({ ...params }: AvailableTagsParamsType): Promise<any>;
278
+ interface ResourceTypesParamsType {
279
+ codeOrName?: string;
280
+ category?: 1 | 2;
281
+ }
282
+ export declare function resourceTypes({ ...params }?: ResourceTypesParamsType): Promise<any>;
283
+ interface ListSimpleByParentCodeParamsType {
284
+ parentCode: string;
285
+ name?: string;
286
+ category?: 1 | 2;
287
+ }
288
+ export declare function ListSimpleByParentCode({ ...params }: ListSimpleByParentCodeParamsType): Promise<any>;
289
+ interface GetResourceTypeInfoByCodeParamsType {
290
+ code: string;
291
+ }
292
+ export declare function getResourceTypeInfoByCode({ ...params }: GetResourceTypeInfoByCodeParamsType): Promise<any>;
293
+ interface GetResourceAttrListSimple {
294
+ }
295
+ export declare function getResourceAttrListSimple({ ...params }: GetResourceAttrListSimple): Promise<any>;
296
+ interface ListSimple4RecentlySimple {
297
+ }
298
+ export declare function listSimple4Recently({ ...params }?: ListSimple4RecentlySimple): Promise<any>;
273
299
  export {};
@@ -23,6 +23,7 @@ interface ObjectListParamsType {
23
23
  skip?: number;
24
24
  bucketName: string;
25
25
  resourceType?: string;
26
+ resourceTypeCode?: string;
26
27
  isLoadingTypeless?: 0 | 1;
27
28
  keywords?: string;
28
29
  projection?: string;
@@ -91,6 +92,7 @@ interface UpdateObjectParamsType {
91
92
  versionRange?: string;
92
93
  }[];
93
94
  resourceType?: string[];
95
+ resourceTypeCode?: string;
94
96
  }
95
97
  export declare function updateObject({ objectIdOrName, ...params }: UpdateObjectParamsType): Promise<any>;
96
98
  interface BatchObjectListParamsType {
@@ -119,6 +121,7 @@ interface ClearUserNodeDataParamsType {
119
121
  export declare function clearUserNodeData({ ...params }: ClearUserNodeDataParamsType): Promise<any>;
120
122
  interface FilesListInfoParamsType {
121
123
  sha1: string;
124
+ resourceTypeCode: string;
122
125
  }
123
126
  export declare function filesListInfo({ ...params }: FilesListInfoParamsType): Promise<any>;
124
127
  export {};
@@ -128,8 +128,9 @@ var RESOURCE_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|
128
128
  // export const RESOURCE_TYPE: RegExp = new RegExp(/^(?!_)[a-z0-9_]{3,20}(?<!_)$/);
129
129
 
130
130
  var RESOURCE_TYPE = /*#__PURE__*/new RegExp(/^[a-z0-9][a-z0-9_]{1,18}[a-z0-9]$/); // 自定义属性键
131
+ // export const CUSTOM_KEY: RegExp = new RegExp(/^[a-zA-Z0-9_]{1,20}$/);
131
132
 
132
- var CUSTOM_KEY = /*#__PURE__*/new RegExp(/^[a-zA-Z0-9_]{1,20}$/); // 节点名称
133
+ var CUSTOM_KEY = /*#__PURE__*/new RegExp(/^[a-zA-Z_][a-zA-Z0-9_]{1,19}$/); // 节点名称
133
134
 
134
135
  var NODE_NAME = /*#__PURE__*/new RegExp(/^[\u4E00-\u9FA5|a-zA-Z0-9]{2,24}$/); // 节点地址
135
136
  // export const NODE_DOMAIN: RegExp = new RegExp(/^(?!-)[a-z0-9-]{4,24}(?<!-)$/);
@@ -1002,21 +1003,26 @@ function details(params) {
1002
1003
  });
1003
1004
  }
1004
1005
  function nodes(params) {
1005
- // return FUtil.Axios.get('/v2/nodes', {
1006
- // params
1007
- // });
1008
1006
  return FUtil.Request({
1009
1007
  method: 'GET',
1010
1008
  url: "/v2/nodes",
1011
1009
  params: params
1012
1010
  });
1013
1011
  }
1012
+ function setNodeInfo(params) {
1013
+ return FUtil.Request({
1014
+ method: 'POST',
1015
+ url: "/v2/nodes/setNodeInfo",
1016
+ data: params
1017
+ });
1018
+ }
1014
1019
 
1015
1020
  var Node = {
1016
1021
  __proto__: null,
1017
1022
  create: create,
1018
1023
  details: details,
1019
- nodes: nodes
1024
+ nodes: nodes,
1025
+ setNodeInfo: setNodeInfo
1020
1026
  };
1021
1027
 
1022
1028
  var _excluded$1 = ["presentableId"],
@@ -1769,6 +1775,53 @@ function availableTags(_ref16) {
1769
1775
  params: params
1770
1776
  });
1771
1777
  }
1778
+ function resourceTypes$1(_temp) {
1779
+ var _ref17 = _temp === void 0 ? {} : _temp,
1780
+ params = _extends({}, _ref17);
1781
+
1782
+ return FUtil.Request({
1783
+ method: 'GET',
1784
+ url: "/v2/resources/types/listSimpleByGroup",
1785
+ params: params
1786
+ });
1787
+ }
1788
+ function ListSimpleByParentCode(_ref18) {
1789
+ var params = _extends({}, _ref18);
1790
+
1791
+ return FUtil.Request({
1792
+ method: 'GET',
1793
+ url: "/v2/resources/types/listSimpleByParentCode",
1794
+ params: params
1795
+ });
1796
+ }
1797
+ function getResourceTypeInfoByCode(_ref19) {
1798
+ var params = _extends({}, _ref19);
1799
+
1800
+ return FUtil.Request({
1801
+ method: 'GET',
1802
+ url: "/v2/resources/types/getInfoByCode",
1803
+ params: params
1804
+ });
1805
+ }
1806
+ function getResourceAttrListSimple(_ref20) {
1807
+ var params = _extends({}, _ref20);
1808
+
1809
+ return FUtil.Request({
1810
+ method: 'GET',
1811
+ url: "/v2/resources/attrs/listSimple",
1812
+ params: params
1813
+ });
1814
+ }
1815
+ function listSimple4Recently(_temp2) {
1816
+ var _ref21 = _temp2 === void 0 ? {} : _temp2,
1817
+ params = _extends({}, _ref21);
1818
+
1819
+ return FUtil.Request({
1820
+ method: 'GET',
1821
+ url: "/v2/resources/types/listSimple4Recently",
1822
+ params: params
1823
+ });
1824
+ }
1772
1825
 
1773
1826
  var Resource = {
1774
1827
  __proto__: null,
@@ -1798,7 +1851,12 @@ var Resource = {
1798
1851
  resourcesCount: resourcesCount,
1799
1852
  batchAuth: batchAuth$1,
1800
1853
  resourcesRecommend: resourcesRecommend,
1801
- availableTags: availableTags
1854
+ availableTags: availableTags,
1855
+ resourceTypes: resourceTypes$1,
1856
+ ListSimpleByParentCode: ListSimpleByParentCode,
1857
+ getResourceTypeInfoByCode: getResourceTypeInfoByCode,
1858
+ getResourceAttrListSimple: getResourceAttrListSimple,
1859
+ listSimple4Recently: listSimple4Recently
1802
1860
  };
1803
1861
 
1804
1862
  var _excluded$4 = ["loginName"];
@@ -2851,13 +2909,13 @@ function getFilesSha1Info(_x, _x2) {
2851
2909
 
2852
2910
  function _getFilesSha1Info() {
2853
2911
  _getFilesSha1Info = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
2854
- var sha1, delay, needHandleSha1, allData, _yield$Storage$filesL, ret, errCode, data, msg, finishedInfo;
2912
+ var sha1, resourceTypeCode, delay, needHandleSha1, allData, _yield$Storage$filesL, ret, errCode, data, msg, finishedInfo;
2855
2913
 
2856
2914
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2857
2915
  while (1) {
2858
2916
  switch (_context.prev = _context.next) {
2859
2917
  case 0:
2860
- sha1 = _ref.sha1;
2918
+ sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
2861
2919
 
2862
2920
  if (cdPartially === void 0) {
2863
2921
  cdPartially = function cdPartially() {
@@ -2884,7 +2942,8 @@ function _getFilesSha1Info() {
2884
2942
 
2885
2943
  _context.next = 10;
2886
2944
  return filesListInfo({
2887
- sha1: needHandleSha1.join(',')
2945
+ sha1: needHandleSha1.join(','),
2946
+ resourceTypeCode: resourceTypeCode
2888
2947
  });
2889
2948
 
2890
2949
  case 10:
@@ -2927,9 +2986,9 @@ function _getFilesSha1Info() {
2927
2986
  state = 'success';
2928
2987
  } else if (d.metaAnalyzeStatus === 3) {
2929
2988
  state = 'fail';
2930
- }
2989
+ } // console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
2990
+
2931
2991
 
2932
- console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
2933
2992
  return {
2934
2993
  sha1: d.sha1,
2935
2994
  state: state,
@@ -2975,6 +3034,22 @@ var recombination = {
2975
3034
  getFilesSha1Info: getFilesSha1Info
2976
3035
  };
2977
3036
 
3037
+ function operationCategories(_temp) {
3038
+ var _ref = _temp === void 0 ? {} : _temp,
3039
+ params = _extends({}, _ref);
3040
+
3041
+ return FUtil.Request({
3042
+ method: 'GET',
3043
+ url: "/v2/resources/operation-categories/listSimpleByGroup",
3044
+ params: params
3045
+ });
3046
+ }
3047
+
3048
+ var Operation = {
3049
+ __proto__: null,
3050
+ operationCategories: operationCategories
3051
+ };
3052
+
2978
3053
  var FServiceAPI = {
2979
3054
  Node: Node,
2980
3055
  Exhibit: Exhibit,
@@ -2992,7 +3067,8 @@ var FServiceAPI = {
2992
3067
  Statistic: Statistic,
2993
3068
  I18n: I18n,
2994
3069
  Policy: Policy,
2995
- recombination: recombination
3070
+ recombination: recombination,
3071
+ Operation: Operation
2996
3072
  };
2997
3073
 
2998
3074
  var codeMessage = {