@freelog/tools-lib 0.1.173 → 0.1.175

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.
@@ -174,4 +174,57 @@ interface IgnorePresentableVersionUpdateTipParamsType {
174
174
  ignoreVersion: string;
175
175
  }
176
176
  export declare function ignorePresentableVersionUpdateTip({ presentableId, ...params }: IgnorePresentableVersionUpdateTipParamsType): Promise<any>;
177
+ interface CreatePresentableCollectionParamsType {
178
+ nodeId: number;
179
+ presentableName: string;
180
+ presentableTitle?: string;
181
+ policies?: {
182
+ policyName: string;
183
+ policyText: string;
184
+ status: 0 | 1;
185
+ }[];
186
+ tags?: string[];
187
+ coverImages?: string[];
188
+ resourceTypeCode?: string;
189
+ }
190
+ export declare function createPresentableCollection({ ...params }: CreatePresentableCollectionParamsType): Promise<any>;
191
+ interface AddItemsToPresentableCollectionParamsType {
192
+ presentableId: string;
193
+ addCollectionItems: {
194
+ presentableId: string;
195
+ }[];
196
+ }
197
+ export declare function addItemsToPresentableCollection({ presentableId, ...params }: AddItemsToPresentableCollectionParamsType): Promise<any>;
198
+ interface RemoveItemsFromPresentableCollectionParamsType {
199
+ presentableId: string;
200
+ removeCollectionItemIds: string;
201
+ }
202
+ export declare function removeItemsFromPresentableCollection({ presentableId, ...params }: RemoveItemsFromPresentableCollectionParamsType): Promise<any>;
203
+ interface GetItemsFromPresentableCollectionParamsType {
204
+ presentableId: string;
205
+ isLoadLatestVersionInfo?: 0 | 1;
206
+ skip?: number;
207
+ limit?: number;
208
+ keywords?: string;
209
+ sortField?: 'createDate' | 'sortId';
210
+ sortType?: -1 | 1;
211
+ }
212
+ export declare function getItemsFromPresentableCollection({ presentableId, ...params }: GetItemsFromPresentableCollectionParamsType): Promise<any>;
213
+ interface SetItemsSortFromPresentableCollectionManualParamsType {
214
+ presentableId: string;
215
+ sortIds: string[];
216
+ targetSortId: number;
217
+ }
218
+ export declare function setItemsSortFromPresentableCollectionManual({ presentableId, ...params }: SetItemsSortFromPresentableCollectionManualParamsType): Promise<any>;
219
+ interface SetItemsSortFromPresentableCollectionQuickParamsType {
220
+ presentableId: string;
221
+ sortIds: string[];
222
+ targetSortId: number;
223
+ }
224
+ export declare function setItemsSortFromPresentableCollectionQuick({ presentableId, ...params }: SetItemsSortFromPresentableCollectionQuickParamsType): Promise<any>;
225
+ interface GetItemsAutoCollectRuleParamsType {
226
+ presentableId: string;
227
+ }
228
+ export declare function getItemsAutoCollectRule({ presentableId, }: GetItemsAutoCollectRuleParamsType): Promise<any>;
229
+ export declare function SetItemsAutoCollectRuleParamsType({ presentableId, ...params }: AddItemsToPresentableCollectionParamsType): Promise<any>;
177
230
  export {};
@@ -671,62 +671,66 @@ function collectionExhibitCreator(_ref31) {
671
671
  var nodeID = _ref31.nodeID;
672
672
  return "/node/collectionExhibitCreator/" + nodeID;
673
673
  }
674
- function informNodeManagement(_ref32) {
675
- var nodeID = _ref32.nodeID,
676
- _ref32$showPage = _ref32.showPage,
677
- showPage = _ref32$showPage === void 0 ? 'exhibit' : _ref32$showPage,
678
- params = _objectWithoutPropertiesLoose(_ref32, _excluded4);
674
+ function createdCollectionExhibitManagement(_ref32) {
675
+ var exhibitID = _ref32.exhibitID;
676
+ return "/node/createdCollectionExhibit/formal/" + exhibitID;
677
+ }
678
+ function informNodeManagement(_ref33) {
679
+ var nodeID = _ref33.nodeID,
680
+ _ref33$showPage = _ref33.showPage,
681
+ showPage = _ref33$showPage === void 0 ? 'exhibit' : _ref33$showPage,
682
+ params = _objectWithoutPropertiesLoose(_ref33, _excluded4);
679
683
  return "/node/informal/" + nodeID + handleQuery(_extends({
680
684
  showPage: showPage
681
685
  }, params));
682
686
  }
683
- function informExhibitManagement(_ref33) {
684
- var exhibitID = _ref33.exhibitID;
687
+ function informExhibitManagement(_ref34) {
688
+ var exhibitID = _ref34.exhibitID;
685
689
  return "/node/exhibit/informal/" + exhibitID;
686
690
  }
687
691
  function storageSpace(_temp14) {
688
- var _ref34 = _temp14 === void 0 ? {} : _temp14,
689
- params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
692
+ var _ref35 = _temp14 === void 0 ? {} : _temp14,
693
+ params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
690
694
  return "/storage" + handleQuery(params);
691
695
  }
692
- function objectDetails(_ref35) {
693
- var params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
696
+ function objectDetails(_ref36) {
697
+ var params = _extends({}, (_objectDestructuringEmpty(_ref36), _ref36));
694
698
  return "/storage" + handleQuery(params);
695
699
  }
696
- function collectionCreateSuccess(_ref36) {
697
- var collectionID = _ref36.collectionID;
700
+ function collectionCreateSuccess(_ref37) {
701
+ var collectionID = _ref37.collectionID;
698
702
  return "/result/collection/create/success/" + collectionID;
699
703
  }
700
- function resourceCreateSuccess(_ref37) {
701
- var resourceID = _ref37.resourceID;
704
+ function resourceCreateSuccess(_ref38) {
705
+ var resourceID = _ref38.resourceID;
702
706
  return "/result/resource/create/success/" + resourceID;
703
707
  }
704
- function resourceVersionCreateSuccess(_ref38) {
705
- var resourceID = _ref38.resourceID,
706
- version = _ref38.version;
707
- return "/result/resource/version/create/success/" + resourceID + "/" + version;
708
- }
709
- function resourceVersionCreateRelease(_ref39) {
708
+ function resourceVersionCreateSuccess(_ref39) {
710
709
  var resourceID = _ref39.resourceID,
711
710
  version = _ref39.version;
711
+ return "/result/resource/version/create/success/" + resourceID + "/" + version;
712
+ }
713
+ function resourceVersionCreateRelease(_ref40) {
714
+ var resourceID = _ref40.resourceID,
715
+ version = _ref40.version;
712
716
  return "/result/resource/version/create/release/" + resourceID + "/" + version;
713
717
  }
714
- function nodeCreateSuccess(_ref40) {
715
- var nodeID = _ref40.nodeID;
718
+ function nodeCreateSuccess(_ref41) {
719
+ var nodeID = _ref41.nodeID;
716
720
  return "/result/node/create/success/" + nodeID;
717
721
  }
718
722
  function invitation(_temp15) {
719
- var _ref41 = _temp15 === void 0 ? {} : _temp15,
720
- goTo = _ref41.goTo,
721
- params = _objectWithoutPropertiesLoose(_ref41, _excluded5);
723
+ var _ref42 = _temp15 === void 0 ? {} : _temp15,
724
+ goTo = _ref42.goTo,
725
+ params = _objectWithoutPropertiesLoose(_ref42, _excluded5);
722
726
  // console.log(params.goTo, 'goTo9iowjefklsdj;flksdjflk')
723
727
  return "/invitation" + handleQuery(_extends({}, params, {
724
728
  returnUrl: goTo ? encodeURIComponent(goTo) : undefined
725
729
  }));
726
730
  }
727
731
  function exception403(_temp16) {
728
- var _ref42 = _temp16 === void 0 ? {} : _temp16,
729
- params = _extends({}, (_objectDestructuringEmpty(_ref42), _ref42));
732
+ var _ref43 = _temp16 === void 0 ? {} : _temp16,
733
+ params = _extends({}, (_objectDestructuringEmpty(_ref43), _ref43));
730
734
  var fromUrl = params.from || '';
731
735
  if (!fromUrl) {
732
736
  var _window$location = window.location,
@@ -739,8 +743,8 @@ function exception403(_temp16) {
739
743
  });
740
744
  }
741
745
  function exceptionUnableToAccess(_temp17) {
742
- var _ref43 = _temp17 === void 0 ? {} : _temp17,
743
- params = _extends({}, (_objectDestructuringEmpty(_ref43), _ref43));
746
+ var _ref44 = _temp17 === void 0 ? {} : _temp17,
747
+ params = _extends({}, (_objectDestructuringEmpty(_ref44), _ref44));
744
748
  var fromUrl = params.from || '';
745
749
  if (!fromUrl) {
746
750
  var _window$location2 = window.location,
@@ -753,52 +757,52 @@ function exceptionUnableToAccess(_temp17) {
753
757
  });
754
758
  }
755
759
  function exceptionCommon(_temp18) {
756
- var _ref44 = _temp18 === void 0 ? {} : _temp18,
757
- params = _extends({}, (_objectDestructuringEmpty(_ref44), _ref44));
760
+ var _ref45 = _temp18 === void 0 ? {} : _temp18,
761
+ params = _extends({}, (_objectDestructuringEmpty(_ref45), _ref45));
758
762
  return "/exception/common" + handleQuery(_extends({}, params));
759
763
  }
760
- function nodeFreeze(_ref45) {
761
- var nodeID = _ref45.nodeID;
764
+ function nodeFreeze(_ref46) {
765
+ var nodeID = _ref46.nodeID;
762
766
  return "/result/node/freeze/" + nodeID;
763
767
  }
764
- function resourceFreeze(_ref46) {
765
- var resourceID = _ref46.resourceID;
768
+ function resourceFreeze(_ref47) {
769
+ var resourceID = _ref47.resourceID;
766
770
  return "/result/resource/freeze/" + resourceID;
767
771
  }
768
- function globalSearch(_ref47) {
769
- var search = _ref47.search;
772
+ function globalSearch(_ref48) {
773
+ var search = _ref48.search;
770
774
  return "/search" + handleQuery({
771
775
  search: search
772
776
  });
773
777
  }
774
778
  function login(_temp19) {
775
- var _ref48 = _temp19 === void 0 ? {} : _temp19,
776
- goTo = _ref48.goTo;
779
+ var _ref49 = _temp19 === void 0 ? {} : _temp19,
780
+ goTo = _ref49.goTo;
777
781
  return "/login" + handleQuery({
778
782
  goTo: goTo ? encodeURIComponent(goTo) : undefined
779
783
  });
780
784
  }
781
785
  function logon(_temp20) {
782
- var _ref49 = _temp20 === void 0 ? {} : _temp20,
783
- goTo = _ref49.goTo,
784
- params = _objectWithoutPropertiesLoose(_ref49, _excluded6);
786
+ var _ref50 = _temp20 === void 0 ? {} : _temp20,
787
+ goTo = _ref50.goTo,
788
+ params = _objectWithoutPropertiesLoose(_ref50, _excluded6);
785
789
  return "/logon" + handleQuery(_extends({
786
790
  goTo: goTo ? encodeURIComponent(goTo) : undefined
787
791
  }, params));
788
792
  }
789
793
  function bind(_temp21) {
790
- var _ref50 = _temp21 === void 0 ? {} : _temp21,
791
- goTo = _ref50.goTo,
792
- returnUrl = _ref50.returnUrl,
793
- params = _objectWithoutPropertiesLoose(_ref50, _excluded7);
794
+ var _ref51 = _temp21 === void 0 ? {} : _temp21,
795
+ goTo = _ref51.goTo,
796
+ returnUrl = _ref51.returnUrl,
797
+ params = _objectWithoutPropertiesLoose(_ref51, _excluded7);
794
798
  return "/bind" + handleQuery(_extends({
795
799
  goTo: goTo ? encodeURIComponent(goTo) : undefined,
796
800
  returnUrl: returnUrl ? encodeURIComponent(returnUrl) : undefined
797
801
  }, params));
798
802
  }
799
803
  function retrieveUserPassword(_temp22) {
800
- var _ref51 = _temp22 === void 0 ? {} : _temp22,
801
- goTo = _ref51.goTo;
804
+ var _ref52 = _temp22 === void 0 ? {} : _temp22,
805
+ goTo = _ref52.goTo;
802
806
  return "/retrieve" + handleQuery({
803
807
  goTo: goTo ? encodeURIComponent(goTo) : undefined
804
808
  });
@@ -820,8 +824,8 @@ function reward(_temp26) {
820
824
  return "/logged/reward";
821
825
  }
822
826
  function contract(_temp27) {
823
- var _ref56 = _temp27 === void 0 ? {} : _temp27,
824
- params = _extends({}, (_objectDestructuringEmpty(_ref56), _ref56));
827
+ var _ref57 = _temp27 === void 0 ? {} : _temp27,
828
+ params = _extends({}, (_objectDestructuringEmpty(_ref57), _ref57));
825
829
  return "/logged/contract" + handleQuery(_extends({}, params));
826
830
  }
827
831
  function setting(_temp28) {
@@ -884,6 +888,7 @@ var LinkTo = {
884
888
  exhibitManagement: exhibitManagement,
885
889
  collectionExhibitManagement: collectionExhibitManagement,
886
890
  collectionExhibitCreator: collectionExhibitCreator,
891
+ createdCollectionExhibitManagement: createdCollectionExhibitManagement,
887
892
  informNodeManagement: informNodeManagement,
888
893
  informExhibitManagement: informExhibitManagement,
889
894
  storageSpace: storageSpace,
@@ -1033,7 +1038,13 @@ var _excluded$1 = ["presentableId"],
1033
1038
  _excluded8 = ["presentableId"],
1034
1039
  _excluded9 = ["nodeId"],
1035
1040
  _excluded10 = ["nodeId"],
1036
- _excluded11 = ["presentableId"];
1041
+ _excluded11 = ["presentableId"],
1042
+ _excluded12 = ["presentableId"],
1043
+ _excluded13 = ["presentableId"],
1044
+ _excluded14 = ["presentableId"],
1045
+ _excluded15 = ["presentableId"],
1046
+ _excluded16 = ["presentableId"],
1047
+ _excluded17 = ["presentableId"];
1037
1048
  function createPresentable(params) {
1038
1049
  return FUtil.Request({
1039
1050
  method: 'POST',
@@ -1184,6 +1195,75 @@ function ignorePresentableVersionUpdateTip(_ref12) {
1184
1195
  data: params
1185
1196
  });
1186
1197
  }
1198
+ function createPresentableCollection(_ref13) {
1199
+ var params = _extends({}, (_objectDestructuringEmpty(_ref13), _ref13));
1200
+ return FUtil.Request({
1201
+ method: 'POST',
1202
+ url: "/v2/presentables/catalogues",
1203
+ data: params
1204
+ });
1205
+ }
1206
+ function addItemsToPresentableCollection(_ref14) {
1207
+ var presentableId = _ref14.presentableId,
1208
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1209
+ return FUtil.Request({
1210
+ method: 'POST',
1211
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1212
+ data: params
1213
+ });
1214
+ }
1215
+ function removeItemsFromPresentableCollection(_ref15) {
1216
+ var presentableId = _ref15.presentableId,
1217
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1218
+ return FUtil.Request({
1219
+ method: 'DELETE',
1220
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1221
+ params: params
1222
+ });
1223
+ }
1224
+ function getItemsFromPresentableCollection(_ref16) {
1225
+ var presentableId = _ref16.presentableId,
1226
+ params = _objectWithoutPropertiesLoose(_ref16, _excluded14);
1227
+ return FUtil.Request({
1228
+ method: 'GET',
1229
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1230
+ params: params
1231
+ });
1232
+ }
1233
+ function setItemsSortFromPresentableCollectionManual(_ref17) {
1234
+ var presentableId = _ref17.presentableId,
1235
+ params = _objectWithoutPropertiesLoose(_ref17, _excluded15);
1236
+ return FUtil.Request({
1237
+ method: 'PUT',
1238
+ url: "/v2/presentables/catalogues/" + presentableId + "/manualSort",
1239
+ data: params
1240
+ });
1241
+ }
1242
+ function setItemsSortFromPresentableCollectionQuick(_ref18) {
1243
+ var presentableId = _ref18.presentableId,
1244
+ params = _objectWithoutPropertiesLoose(_ref18, _excluded16);
1245
+ return FUtil.Request({
1246
+ method: 'PUT',
1247
+ url: "/v2/presentables/catalogues/" + presentableId + "/manualSort",
1248
+ data: params
1249
+ });
1250
+ }
1251
+ function getItemsAutoCollectRule(_ref19) {
1252
+ var presentableId = _ref19.presentableId;
1253
+ return FUtil.Request({
1254
+ method: 'GET',
1255
+ url: "/v2/presentables/cataloguea/" + presentableId + "/items/collectRules"
1256
+ });
1257
+ }
1258
+ function SetItemsAutoCollectRuleParamsType(_ref20) {
1259
+ var presentableId = _ref20.presentableId,
1260
+ params = _objectWithoutPropertiesLoose(_ref20, _excluded17);
1261
+ return FUtil.Request({
1262
+ method: 'POST',
1263
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1264
+ data: params
1265
+ });
1266
+ }
1187
1267
 
1188
1268
  var Exhibit = {
1189
1269
  __proto__: null,
@@ -1203,7 +1283,15 @@ var Exhibit = {
1203
1283
  batchCreatePresentable: batchCreatePresentable,
1204
1284
  batchUpdatePresentable: batchUpdatePresentable,
1205
1285
  batchUpdatePresentableStatus: batchUpdatePresentableStatus,
1206
- ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip
1286
+ ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip,
1287
+ createPresentableCollection: createPresentableCollection,
1288
+ addItemsToPresentableCollection: addItemsToPresentableCollection,
1289
+ removeItemsFromPresentableCollection: removeItemsFromPresentableCollection,
1290
+ getItemsFromPresentableCollection: getItemsFromPresentableCollection,
1291
+ setItemsSortFromPresentableCollectionManual: setItemsSortFromPresentableCollectionManual,
1292
+ setItemsSortFromPresentableCollectionQuick: setItemsSortFromPresentableCollectionQuick,
1293
+ getItemsAutoCollectRule: getItemsAutoCollectRule,
1294
+ SetItemsAutoCollectRuleParamsType: SetItemsAutoCollectRuleParamsType
1207
1295
  };
1208
1296
 
1209
1297
  var _excluded$2 = ["bucketName"],
@@ -1535,12 +1623,12 @@ var _excluded$3 = ["resourceIdOrName"],
1535
1623
  _excluded9$1 = ["resourceId"],
1536
1624
  _excluded10$1 = ["resourceId"],
1537
1625
  _excluded11$1 = ["resourceId"],
1538
- _excluded12 = ["resourceId"],
1539
- _excluded13 = ["resourceId"],
1540
- _excluded14 = ["resourceId"],
1541
- _excluded15 = ["resourceId"],
1542
- _excluded16 = ["resourceId"],
1543
- _excluded17 = ["resourceId"],
1626
+ _excluded12$1 = ["resourceId"],
1627
+ _excluded13$1 = ["resourceId"],
1628
+ _excluded14$1 = ["resourceId"],
1629
+ _excluded15$1 = ["resourceId"],
1630
+ _excluded16$1 = ["resourceId"],
1631
+ _excluded17$1 = ["resourceId"],
1544
1632
  _excluded18 = ["resourceId"],
1545
1633
  _excluded19 = ["resourceId"],
1546
1634
  _excluded20 = ["resourceId"],
@@ -1785,7 +1873,7 @@ function cycleDependencyCheck$1(_ref13) {
1785
1873
  }
1786
1874
  function relationTree$1(_ref14) {
1787
1875
  var resourceId = _ref14.resourceId,
1788
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1876
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12$1);
1789
1877
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
1790
1878
  // params,
1791
1879
  // });
@@ -1797,7 +1885,7 @@ function relationTree$1(_ref14) {
1797
1885
  }
1798
1886
  function relationTreeAuth(_ref15) {
1799
1887
  var resourceId = _ref15.resourceId,
1800
- params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1888
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13$1);
1801
1889
  return FUtil.Request({
1802
1890
  method: 'GET',
1803
1891
  url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
@@ -1898,7 +1986,7 @@ function generateResourceNames(_ref26) {
1898
1986
  }
1899
1987
  function updateCollection(_ref27) {
1900
1988
  var resourceId = _ref27.resourceId,
1901
- params = _objectWithoutPropertiesLoose(_ref27, _excluded14);
1989
+ params = _objectWithoutPropertiesLoose(_ref27, _excluded14$1);
1902
1990
  return FUtil.Request({
1903
1991
  method: 'PUT',
1904
1992
  url: "/v2/resources/catalogue/" + resourceId,
@@ -1915,7 +2003,7 @@ function deleteCollectionUnitResource(_ref28) {
1915
2003
  }
1916
2004
  function getCollectionItems(_ref29) {
1917
2005
  var resourceId = _ref29.resourceId,
1918
- params = _objectWithoutPropertiesLoose(_ref29, _excluded15);
2006
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded15$1);
1919
2007
  return FUtil.Request({
1920
2008
  method: 'GET',
1921
2009
  url: "/v2/resources/catalogue/" + resourceId + "/items",
@@ -1924,7 +2012,7 @@ function getCollectionItems(_ref29) {
1924
2012
  }
1925
2013
  function getCollectionItems_Draft(_ref30) {
1926
2014
  var resourceId = _ref30.resourceId,
1927
- params = _objectWithoutPropertiesLoose(_ref30, _excluded16);
2015
+ params = _objectWithoutPropertiesLoose(_ref30, _excluded16$1);
1928
2016
  return FUtil.Request({
1929
2017
  method: 'GET',
1930
2018
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
@@ -1933,7 +2021,7 @@ function getCollectionItems_Draft(_ref30) {
1933
2021
  }
1934
2022
  function setCollectionItemSort(_ref31) {
1935
2023
  var resourceId = _ref31.resourceId,
1936
- params = _objectWithoutPropertiesLoose(_ref31, _excluded17);
2024
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded17$1);
1937
2025
  return FUtil.Request({
1938
2026
  method: 'PUT',
1939
2027
  url: "/v2/resources/catalogue/" + resourceId + "/manualSort",