@freelog/tools-lib 0.1.154 → 0.1.155

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.
@@ -42,6 +42,7 @@ interface GetRewardRecordInfoParamsType {
42
42
  export declare function getRewardRecordInfo(params: GetRewardRecordInfoParamsType): Promise<any>;
43
43
  interface PushMessageTaskParamsType {
44
44
  taskConfigCode: string;
45
+ meta?: any;
45
46
  }
46
47
  export declare function pushMessageTask(params: PushMessageTaskParamsType): Promise<any>;
47
48
  interface GetCoinAccountParamsType {
@@ -40,6 +40,7 @@ export declare function create(params: CreateParamsType): Promise<any>;
40
40
  interface UpdateParamsType {
41
41
  resourceId: string;
42
42
  status?: 0 | 1;
43
+ resourceTitle?: string;
43
44
  intro?: string;
44
45
  tags?: string[];
45
46
  coverImages?: string[];
@@ -141,7 +142,7 @@ interface CreateVersionParamsType {
141
142
  policyId: string;
142
143
  }[];
143
144
  }[];
144
- inputAttrs: {
145
+ inputAttrs?: {
145
146
  key: string;
146
147
  value: string;
147
148
  }[];
@@ -678,89 +678,100 @@ function myCollects(_temp8) {
678
678
  }
679
679
  function resourceInfo(_ref11) {
680
680
  var resourceID = _ref11.resourceID;
681
- return "/resource/info/" + resourceID;
681
+ return "/resource/sidebar/info/" + resourceID;
682
682
  }
683
- function resourceAuth(_ref12) {
683
+ function resourcePolicy(_ref12) {
684
684
  var resourceID = _ref12.resourceID;
685
- return "/resource/auth/" + resourceID;
685
+ return "/resource/sidebar/policy/" + resourceID;
686
686
  }
687
- function resourceCreateVersion(_ref13) {
687
+ function resourceContract(_ref13) {
688
688
  var resourceID = _ref13.resourceID;
689
- return "/resource/version/creator/" + resourceID;
689
+ return "/resource/sidebar/contract/" + resourceID;
690
690
  }
691
- function resourceVersion(_ref14) {
692
- var resourceID = _ref14.resourceID,
693
- version = _ref14.version;
694
- return "/resource/version/info/" + resourceID + "/" + version;
691
+ function resourceDependency(_ref14) {
692
+ var resourceID = _ref14.resourceID;
693
+ return "/resource/sidebar/dependency/" + resourceID;
694
+ }
695
+ function resourceVersionCreator(_ref15) {
696
+ var resourceID = _ref15.resourceID;
697
+ return "/resource/versionCreator/" + resourceID;
698
+ }
699
+ function resourceVersionInfo(_ref16) {
700
+ var resourceID = _ref16.resourceID,
701
+ _ref16$version = _ref16.version,
702
+ version = _ref16$version === void 0 ? '' : _ref16$version;
703
+ return "/resource/sidebar/versionInfo/" + resourceID + handleQuery({
704
+ version: version
705
+ });
695
706
  }
696
707
  function nodeCreator(_temp9) {
697
- var _ref15 = _temp9 === void 0 ? {} : _temp9;
708
+ var _ref17 = _temp9 === void 0 ? {} : _temp9;
698
709
 
699
- _objectDestructuringEmpty(_ref15);
710
+ _objectDestructuringEmpty(_ref17);
700
711
 
701
712
  return "/node/creator";
702
713
  }
703
- function nodeManagement(_ref16) {
704
- var nodeID = _ref16.nodeID,
705
- _ref16$showPage = _ref16.showPage,
706
- showPage = _ref16$showPage === void 0 ? 'exhibit' : _ref16$showPage,
707
- params = _objectWithoutPropertiesLoose(_ref16, _excluded2);
714
+ function nodeManagement(_ref18) {
715
+ var nodeID = _ref18.nodeID,
716
+ _ref18$showPage = _ref18.showPage,
717
+ showPage = _ref18$showPage === void 0 ? 'exhibit' : _ref18$showPage,
718
+ params = _objectWithoutPropertiesLoose(_ref18, _excluded2);
708
719
 
709
720
  return "/node/formal/" + nodeID + handleQuery(_extends({
710
721
  showPage: showPage
711
722
  }, params));
712
723
  }
713
- function exhibitManagement(_ref17) {
714
- var exhibitID = _ref17.exhibitID;
724
+ function exhibitManagement(_ref19) {
725
+ var exhibitID = _ref19.exhibitID;
715
726
  return "/node/exhibit/formal/" + exhibitID;
716
727
  }
717
- function informNodeManagement(_ref18) {
718
- var nodeID = _ref18.nodeID,
719
- _ref18$showPage = _ref18.showPage,
720
- showPage = _ref18$showPage === void 0 ? 'exhibit' : _ref18$showPage,
721
- params = _objectWithoutPropertiesLoose(_ref18, _excluded3);
728
+ function informNodeManagement(_ref20) {
729
+ var nodeID = _ref20.nodeID,
730
+ _ref20$showPage = _ref20.showPage,
731
+ showPage = _ref20$showPage === void 0 ? 'exhibit' : _ref20$showPage,
732
+ params = _objectWithoutPropertiesLoose(_ref20, _excluded3);
722
733
 
723
734
  return "/node/informal/" + nodeID + handleQuery(_extends({
724
735
  showPage: showPage
725
736
  }, params));
726
737
  }
727
- function informExhibitManagement(_ref19) {
728
- var exhibitID = _ref19.exhibitID;
738
+ function informExhibitManagement(_ref21) {
739
+ var exhibitID = _ref21.exhibitID;
729
740
  return "/node/exhibit/informal/" + exhibitID;
730
741
  }
731
742
  function storageSpace(_temp10) {
732
- var _ref20 = _temp10 === void 0 ? {} : _temp10,
733
- params = _extends({}, _ref20);
743
+ var _ref22 = _temp10 === void 0 ? {} : _temp10,
744
+ params = _extends({}, _ref22);
734
745
 
735
746
  return "/storage" + handleQuery(params);
736
747
  }
737
- function objectDetails(_ref21) {
738
- var params = _extends({}, _ref21);
748
+ function objectDetails(_ref23) {
749
+ var params = _extends({}, _ref23);
739
750
 
740
751
  return "/storage" + handleQuery(params);
741
752
  }
742
- function resourceCreateSuccess(_ref22) {
743
- var resourceID = _ref22.resourceID;
753
+ function resourceCreateSuccess(_ref24) {
754
+ var resourceID = _ref24.resourceID;
744
755
  return "/result/resource/create/success/" + resourceID;
745
756
  }
746
- function resourceVersionCreateSuccess(_ref23) {
747
- var resourceID = _ref23.resourceID,
748
- version = _ref23.version;
757
+ function resourceVersionCreateSuccess(_ref25) {
758
+ var resourceID = _ref25.resourceID,
759
+ version = _ref25.version;
749
760
  return "/result/resource/version/create/success/" + resourceID + "/" + version;
750
761
  }
751
- function resourceVersionCreateRelease(_ref24) {
752
- var resourceID = _ref24.resourceID,
753
- version = _ref24.version;
762
+ function resourceVersionCreateRelease(_ref26) {
763
+ var resourceID = _ref26.resourceID,
764
+ version = _ref26.version;
754
765
  return "/result/resource/version/create/release/" + resourceID + "/" + version;
755
766
  }
756
- function nodeCreateSuccess(_ref25) {
757
- var nodeID = _ref25.nodeID;
767
+ function nodeCreateSuccess(_ref27) {
768
+ var nodeID = _ref27.nodeID;
758
769
  return "/result/node/create/success/" + nodeID;
759
770
  }
760
771
  function invitation(_temp11) {
761
- var _ref26 = _temp11 === void 0 ? {} : _temp11,
762
- goTo = _ref26.goTo,
763
- params = _objectWithoutPropertiesLoose(_ref26, _excluded4);
772
+ var _ref28 = _temp11 === void 0 ? {} : _temp11,
773
+ goTo = _ref28.goTo,
774
+ params = _objectWithoutPropertiesLoose(_ref28, _excluded4);
764
775
 
765
776
  // console.log(params.goTo, 'goTo9iowjefklsdj;flksdjflk')
766
777
  return "/invitation" + handleQuery(_extends({}, params, {
@@ -768,8 +779,8 @@ function invitation(_temp11) {
768
779
  }));
769
780
  }
770
781
  function exception403(_temp12) {
771
- var _ref27 = _temp12 === void 0 ? {} : _temp12,
772
- params = _extends({}, _ref27);
782
+ var _ref29 = _temp12 === void 0 ? {} : _temp12,
783
+ params = _extends({}, _ref29);
773
784
 
774
785
  var fromUrl = params.from || '';
775
786
 
@@ -784,42 +795,42 @@ function exception403(_temp12) {
784
795
  from: fromUrl
785
796
  });
786
797
  }
787
- function nodeFreeze(_ref28) {
788
- var nodeID = _ref28.nodeID;
798
+ function nodeFreeze(_ref30) {
799
+ var nodeID = _ref30.nodeID;
789
800
  return "/result/node/freeze/" + nodeID;
790
801
  }
791
- function resourceFreeze(_ref29) {
792
- var resourceID = _ref29.resourceID;
802
+ function resourceFreeze(_ref31) {
803
+ var resourceID = _ref31.resourceID;
793
804
  return "/result/resource/freeze/" + resourceID;
794
805
  }
795
- function globalSearch(_ref30) {
796
- var search = _ref30.search;
806
+ function globalSearch(_ref32) {
807
+ var search = _ref32.search;
797
808
  return "/search" + handleQuery({
798
809
  search: search
799
810
  });
800
811
  }
801
812
  function login(_temp13) {
802
- var _ref31 = _temp13 === void 0 ? {} : _temp13,
803
- goTo = _ref31.goTo;
813
+ var _ref33 = _temp13 === void 0 ? {} : _temp13,
814
+ goTo = _ref33.goTo;
804
815
 
805
816
  return "/login" + handleQuery({
806
817
  goTo: goTo ? encodeURIComponent(goTo) : undefined
807
818
  });
808
819
  }
809
820
  function logon(_temp14) {
810
- var _ref32 = _temp14 === void 0 ? {} : _temp14,
811
- goTo = _ref32.goTo,
812
- params = _objectWithoutPropertiesLoose(_ref32, _excluded5);
821
+ var _ref34 = _temp14 === void 0 ? {} : _temp14,
822
+ goTo = _ref34.goTo,
823
+ params = _objectWithoutPropertiesLoose(_ref34, _excluded5);
813
824
 
814
825
  return "/logon" + handleQuery(_extends({
815
826
  goTo: goTo ? encodeURIComponent(goTo) : undefined
816
827
  }, params));
817
828
  }
818
829
  function bind(_temp15) {
819
- var _ref33 = _temp15 === void 0 ? {} : _temp15,
820
- goTo = _ref33.goTo,
821
- returnUrl = _ref33.returnUrl,
822
- params = _objectWithoutPropertiesLoose(_ref33, _excluded6);
830
+ var _ref35 = _temp15 === void 0 ? {} : _temp15,
831
+ goTo = _ref35.goTo,
832
+ returnUrl = _ref35.returnUrl,
833
+ params = _objectWithoutPropertiesLoose(_ref35, _excluded6);
823
834
 
824
835
  return "/bind" + handleQuery(_extends({
825
836
  goTo: goTo ? encodeURIComponent(goTo) : undefined,
@@ -827,66 +838,66 @@ function bind(_temp15) {
827
838
  }, params));
828
839
  }
829
840
  function retrieveUserPassword(_temp16) {
830
- var _ref34 = _temp16 === void 0 ? {} : _temp16,
831
- goTo = _ref34.goTo;
841
+ var _ref36 = _temp16 === void 0 ? {} : _temp16,
842
+ goTo = _ref36.goTo;
832
843
 
833
844
  return "/retrieve" + handleQuery({
834
845
  goTo: goTo ? encodeURIComponent(goTo) : undefined
835
846
  });
836
847
  }
837
848
  function retrievePayPassword(_temp17) {
838
- var _ref35 = _temp17 === void 0 ? {} : _temp17;
849
+ var _ref37 = _temp17 === void 0 ? {} : _temp17;
839
850
 
840
- _objectDestructuringEmpty(_ref35);
851
+ _objectDestructuringEmpty(_ref37);
841
852
 
842
853
  return "/retrievePayPassword";
843
854
  }
844
855
  function userFreeze(_temp18) {
845
- var _ref36 = _temp18 === void 0 ? {} : _temp18;
856
+ var _ref38 = _temp18 === void 0 ? {} : _temp18;
846
857
 
847
- _objectDestructuringEmpty(_ref36);
858
+ _objectDestructuringEmpty(_ref38);
848
859
 
849
860
  return "/freeze";
850
861
  }
851
862
  function wallet(_temp19) {
852
- var _ref37 = _temp19 === void 0 ? {} : _temp19;
863
+ var _ref39 = _temp19 === void 0 ? {} : _temp19;
853
864
 
854
- _objectDestructuringEmpty(_ref37);
865
+ _objectDestructuringEmpty(_ref39);
855
866
 
856
867
  return "/logged/wallet";
857
868
  }
858
869
  function reward(_temp20) {
859
- var _ref38 = _temp20 === void 0 ? {} : _temp20;
870
+ var _ref40 = _temp20 === void 0 ? {} : _temp20;
860
871
 
861
- _objectDestructuringEmpty(_ref38);
872
+ _objectDestructuringEmpty(_ref40);
862
873
 
863
874
  return "/logged/reward";
864
875
  }
865
876
  function contract(_temp21) {
866
- var _ref39 = _temp21 === void 0 ? {} : _temp21;
877
+ var _ref41 = _temp21 === void 0 ? {} : _temp21;
867
878
 
868
- _objectDestructuringEmpty(_ref39);
879
+ _objectDestructuringEmpty(_ref41);
869
880
 
870
881
  return "/logged/contract";
871
882
  }
872
883
  function setting(_temp22) {
873
- var _ref40 = _temp22 === void 0 ? {} : _temp22;
884
+ var _ref42 = _temp22 === void 0 ? {} : _temp22;
874
885
 
875
- _objectDestructuringEmpty(_ref40);
886
+ _objectDestructuringEmpty(_ref42);
876
887
 
877
888
  return "/logged/setting";
878
889
  }
879
890
  function binding(_temp23) {
880
- var _ref41 = _temp23 === void 0 ? {} : _temp23;
891
+ var _ref43 = _temp23 === void 0 ? {} : _temp23;
881
892
 
882
- _objectDestructuringEmpty(_ref41);
893
+ _objectDestructuringEmpty(_ref43);
883
894
 
884
895
  return "/logged/binding";
885
896
  }
886
897
  function resultBindingSuccess(_temp24) {
887
- var _ref42 = _temp24 === void 0 ? {} : _temp24;
898
+ var _ref44 = _temp24 === void 0 ? {} : _temp24;
888
899
 
889
- _objectDestructuringEmpty(_ref42);
900
+ _objectDestructuringEmpty(_ref44);
890
901
 
891
902
  return "/result/binding";
892
903
  }
@@ -922,9 +933,11 @@ var LinkTo = {
922
933
  myResources: myResources,
923
934
  myCollects: myCollects,
924
935
  resourceInfo: resourceInfo,
925
- resourceAuth: resourceAuth,
926
- resourceCreateVersion: resourceCreateVersion,
927
- resourceVersion: resourceVersion,
936
+ resourcePolicy: resourcePolicy,
937
+ resourceContract: resourceContract,
938
+ resourceDependency: resourceDependency,
939
+ resourceVersionCreator: resourceVersionCreator,
940
+ resourceVersionInfo: resourceVersionInfo,
928
941
  nodeCreator: nodeCreator,
929
942
  nodeManagement: nodeManagement,
930
943
  exhibitManagement: exhibitManagement,
@@ -2924,8 +2937,8 @@ function getAvatarUrl(userID) {
2924
2937
  userID = 0;
2925
2938
  }
2926
2939
 
2927
- // return `${completeUrlByDomain('image')}/headImage/${userID || getUserIDByCookies()}?t=${Date.now()}`;
2928
- return "https://image.freelog.com/headImage/" + (userID || getUserIDByCookies()) + "?t=" + Date.now();
2940
+ // return `${completeUrlByDomain('image')}/avatar/${userID || getUserIDByCookies()}?t=${Date.now()}`;
2941
+ return "https://image.freelog.com/avatar/" + (userID || getUserIDByCookies()) + "?t=" + Date.now();
2929
2942
  }
2930
2943
 
2931
2944
  var Tool = {