@freelog/tools-lib 0.1.146 → 0.1.147

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.
@@ -8,7 +8,7 @@ interface CollectionResourcesParamsType {
8
8
  keywords?: string;
9
9
  resourceType?: string;
10
10
  omitResourceType?: string;
11
- resourceStatus?: 0 | 1 | 2;
11
+ resourceStatus?: 0 | 1 | 2 | 4;
12
12
  }
13
13
  export declare function collectionResources(params: CollectionResourcesParamsType): Promise<any>;
14
14
  interface DeleteCollectResourceParamsType {
@@ -42,6 +42,10 @@ export declare function updatePresentable({ presentableId, ...params }: UpdatePr
42
42
  interface PresentablesOnlineParamsType {
43
43
  presentableId: string;
44
44
  onlineStatus: 0 | 1;
45
+ updatePolicies?: {
46
+ policyId: string;
47
+ status: 0 | 1;
48
+ };
45
49
  }
46
50
  export declare function presentablesOnlineStatus({ presentableId, ...params }: PresentablesOnlineParamsType): Promise<any>;
47
51
  interface PresentableDetailsParamsType1 {
@@ -21,7 +21,7 @@ interface IResourceInfo {
21
21
  version: string;
22
22
  versionId: string;
23
23
  }[];
24
- status: 0 | 1 | 2 | 3;
24
+ status: 0 | 1 | 2 | 4;
25
25
  tags: string[];
26
26
  updateDate: string;
27
27
  userId: number;
@@ -61,7 +61,7 @@ interface ListParamsType {
61
61
  omitResourceType?: string;
62
62
  isSelf?: 0 | 1;
63
63
  userId?: number;
64
- status?: 0 | 1 | 2;
64
+ status?: 0 | 1 | 2 | 4;
65
65
  isLoadPolicyInfo?: 0 | 1;
66
66
  isLoadLatestVersionInfo?: 0 | 1;
67
67
  isLoadFreezeReason?: 0 | 1;
@@ -266,4 +266,8 @@ interface ResourcesRecommendParamsType {
266
266
  recommendType: 1 | 2;
267
267
  }
268
268
  export declare function resourcesRecommend({ ...params }: ResourcesRecommendParamsType): Promise<any>;
269
+ interface AvailableTagsParamsType {
270
+ resourceType: string;
271
+ }
272
+ export declare function availableTags({ ...params }: AvailableTagsParamsType): Promise<any>;
269
273
  export {};
@@ -7,8 +7,6 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
7
7
  var moment = _interopDefault(require('moment'));
8
8
  var querystring = require('querystring');
9
9
  var axios = _interopDefault(require('axios'));
10
- var NProgress = _interopDefault(require('nprogress'));
11
- require('nprogress/nprogress.css');
12
10
  var CryptoJS = require('crypto-js');
13
11
  var i18next = _interopDefault(require('i18next'));
14
12
  var Cookies = _interopDefault(require('js-cookie'));
@@ -740,14 +738,19 @@ function resourceVersionCreateSuccess(_ref23) {
740
738
  version = _ref23.version;
741
739
  return "/result/resource/version/create/success/" + resourceID + "/" + version;
742
740
  }
743
- function nodeCreateSuccess(_ref24) {
744
- var nodeID = _ref24.nodeID;
741
+ function resourceVersionCreateRelease(_ref24) {
742
+ var resourceID = _ref24.resourceID,
743
+ version = _ref24.version;
744
+ return "/result/resource/version/create/release/" + resourceID + "/" + version;
745
+ }
746
+ function nodeCreateSuccess(_ref25) {
747
+ var nodeID = _ref25.nodeID;
745
748
  return "/result/node/create/success/" + nodeID;
746
749
  }
747
750
  function invitation(_temp11) {
748
- var _ref25 = _temp11 === void 0 ? {} : _temp11,
749
- goTo = _ref25.goTo,
750
- params = _objectWithoutPropertiesLoose(_ref25, _excluded4);
751
+ var _ref26 = _temp11 === void 0 ? {} : _temp11,
752
+ goTo = _ref26.goTo,
753
+ params = _objectWithoutPropertiesLoose(_ref26, _excluded4);
751
754
 
752
755
  // console.log(params.goTo, 'goTo9iowjefklsdj;flksdjflk')
753
756
  return "/invitation" + handleQuery(_extends({}, params, {
@@ -755,8 +758,8 @@ function invitation(_temp11) {
755
758
  }));
756
759
  }
757
760
  function exception403(_temp12) {
758
- var _ref26 = _temp12 === void 0 ? {} : _temp12,
759
- params = _extends({}, _ref26);
761
+ var _ref27 = _temp12 === void 0 ? {} : _temp12,
762
+ params = _extends({}, _ref27);
760
763
 
761
764
  var fromUrl = params.from || '';
762
765
 
@@ -771,92 +774,92 @@ function exception403(_temp12) {
771
774
  from: fromUrl
772
775
  });
773
776
  }
774
- function nodeFreeze(_ref27) {
775
- var nodeID = _ref27.nodeID;
777
+ function nodeFreeze(_ref28) {
778
+ var nodeID = _ref28.nodeID;
776
779
  return "/result/node/freeze/" + nodeID;
777
780
  }
778
- function resourceFreeze(_ref28) {
779
- var resourceID = _ref28.resourceID;
781
+ function resourceFreeze(_ref29) {
782
+ var resourceID = _ref29.resourceID;
780
783
  return "/result/resource/freeze/" + resourceID;
781
784
  }
782
785
  function login(_temp13) {
783
- var _ref29 = _temp13 === void 0 ? {} : _temp13,
784
- goTo = _ref29.goTo;
786
+ var _ref30 = _temp13 === void 0 ? {} : _temp13,
787
+ goTo = _ref30.goTo;
785
788
 
786
789
  return "/login" + handleQuery({
787
790
  goTo: goTo ? encodeURIComponent(goTo) : undefined
788
791
  });
789
792
  }
790
793
  function logon(_temp14) {
791
- var _ref30 = _temp14 === void 0 ? {} : _temp14,
792
- goTo = _ref30.goTo,
793
- params = _objectWithoutPropertiesLoose(_ref30, _excluded5);
794
+ var _ref31 = _temp14 === void 0 ? {} : _temp14,
795
+ goTo = _ref31.goTo,
796
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded5);
794
797
 
795
798
  return "/logon" + handleQuery(_extends({
796
799
  goTo: goTo ? encodeURIComponent(goTo) : undefined
797
800
  }, params));
798
801
  }
799
802
  function retrieveUserPassword(_temp15) {
800
- var _ref31 = _temp15 === void 0 ? {} : _temp15,
801
- goTo = _ref31.goTo;
803
+ var _ref32 = _temp15 === void 0 ? {} : _temp15,
804
+ goTo = _ref32.goTo;
802
805
 
803
806
  return "/retrieve" + handleQuery({
804
807
  goTo: goTo ? encodeURIComponent(goTo) : undefined
805
808
  });
806
809
  }
807
810
  function retrievePayPassword(_temp16) {
808
- var _ref32 = _temp16 === void 0 ? {} : _temp16;
811
+ var _ref33 = _temp16 === void 0 ? {} : _temp16;
809
812
 
810
- _objectDestructuringEmpty(_ref32);
813
+ _objectDestructuringEmpty(_ref33);
811
814
 
812
815
  return "/retrievePayPassword";
813
816
  }
814
817
  function userFreeze(_temp17) {
815
- var _ref33 = _temp17 === void 0 ? {} : _temp17;
818
+ var _ref34 = _temp17 === void 0 ? {} : _temp17;
816
819
 
817
- _objectDestructuringEmpty(_ref33);
820
+ _objectDestructuringEmpty(_ref34);
818
821
 
819
822
  return "/freeze";
820
823
  }
821
824
  function wallet(_temp18) {
822
- var _ref34 = _temp18 === void 0 ? {} : _temp18;
825
+ var _ref35 = _temp18 === void 0 ? {} : _temp18;
823
826
 
824
- _objectDestructuringEmpty(_ref34);
827
+ _objectDestructuringEmpty(_ref35);
825
828
 
826
829
  return "/logged/wallet";
827
830
  }
828
831
  function reward(_temp19) {
829
- var _ref35 = _temp19 === void 0 ? {} : _temp19;
832
+ var _ref36 = _temp19 === void 0 ? {} : _temp19;
830
833
 
831
- _objectDestructuringEmpty(_ref35);
834
+ _objectDestructuringEmpty(_ref36);
832
835
 
833
836
  return "/logged/reward";
834
837
  }
835
838
  function contract(_temp20) {
836
- var _ref36 = _temp20 === void 0 ? {} : _temp20;
839
+ var _ref37 = _temp20 === void 0 ? {} : _temp20;
837
840
 
838
- _objectDestructuringEmpty(_ref36);
841
+ _objectDestructuringEmpty(_ref37);
839
842
 
840
843
  return "/logged/contract";
841
844
  }
842
845
  function setting(_temp21) {
843
- var _ref37 = _temp21 === void 0 ? {} : _temp21;
846
+ var _ref38 = _temp21 === void 0 ? {} : _temp21;
844
847
 
845
- _objectDestructuringEmpty(_ref37);
848
+ _objectDestructuringEmpty(_ref38);
846
849
 
847
850
  return "/logged/setting";
848
851
  }
849
852
  function binding(_temp22) {
850
- var _ref38 = _temp22 === void 0 ? {} : _temp22;
853
+ var _ref39 = _temp22 === void 0 ? {} : _temp22;
851
854
 
852
- _objectDestructuringEmpty(_ref38);
855
+ _objectDestructuringEmpty(_ref39);
853
856
 
854
857
  return "/logged/binding";
855
858
  }
856
859
  function resultBindingSuccess(_temp23) {
857
- var _ref39 = _temp23 === void 0 ? {} : _temp23;
860
+ var _ref40 = _temp23 === void 0 ? {} : _temp23;
858
861
 
859
- _objectDestructuringEmpty(_ref39);
862
+ _objectDestructuringEmpty(_ref40);
860
863
 
861
864
  return "/result/binding";
862
865
  }
@@ -904,6 +907,7 @@ var LinkTo = {
904
907
  objectDetails: objectDetails,
905
908
  resourceCreateSuccess: resourceCreateSuccess,
906
909
  resourceVersionCreateSuccess: resourceVersionCreateSuccess,
910
+ resourceVersionCreateRelease: resourceVersionCreateRelease,
907
911
  nodeCreateSuccess: nodeCreateSuccess,
908
912
  invitation: invitation,
909
913
  exception403: exception403,
@@ -1756,6 +1760,15 @@ function resourcesRecommend(_ref15) {
1756
1760
  params: params
1757
1761
  });
1758
1762
  }
1763
+ function availableTags(_ref16) {
1764
+ var params = _extends({}, _ref16);
1765
+
1766
+ return FUtil.Request({
1767
+ method: 'GET',
1768
+ url: "/v2/resources/tags/availableTags",
1769
+ params: params
1770
+ });
1771
+ }
1759
1772
 
1760
1773
  var Resource = {
1761
1774
  __proto__: null,
@@ -1784,7 +1797,8 @@ var Resource = {
1784
1797
  relationTreeAuth: relationTreeAuth,
1785
1798
  resourcesCount: resourcesCount,
1786
1799
  batchAuth: batchAuth$1,
1787
- resourcesRecommend: resourcesRecommend
1800
+ resourcesRecommend: resourcesRecommend,
1801
+ availableTags: availableTags
1788
1802
  };
1789
1803
 
1790
1804
  var _excluded$4 = ["loginName"];
@@ -3018,11 +3032,11 @@ if (window.location.hostname.includes('.com')) {
3018
3032
 
3019
3033
  axios.interceptors.request.use(function (config) {
3020
3034
  // Do something before request is sent
3021
- NProgress.start();
3035
+ // NProgress.start();
3022
3036
  return config;
3023
3037
  }, function (error) {
3024
3038
  // Do something with request error
3025
- NProgress.done();
3039
+ // NProgress.done();
3026
3040
  return Promise.reject(error);
3027
3041
  });
3028
3042
  /**
@@ -3034,8 +3048,7 @@ axios.interceptors.response.use(function (response) {
3034
3048
 
3035
3049
  // Do something with response data
3036
3050
  // console.log(response, 'response!!!!!!');
3037
- NProgress.done();
3038
-
3051
+ // NProgress.done();
3039
3052
  if (response.status !== 200) {
3040
3053
  var error = {
3041
3054
  description: codeMessage[response.status],
@@ -3067,7 +3080,7 @@ axios.interceptors.response.use(function (response) {
3067
3080
  return data;
3068
3081
  }, function (error) {
3069
3082
  // Do something with response error
3070
- NProgress.done();
3083
+ // NProgress.done();
3071
3084
  return Promise.reject(error);
3072
3085
  });
3073
3086
  function request(_x, _x2) {