@freelog/tools-lib 0.1.173 → 0.1.174

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,51 @@ 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
+ }
189
+ export declare function createPresentableCollection({ ...params }: CreatePresentableCollectionParamsType): Promise<any>;
190
+ interface AddItemsToPresentableCollectionParamsType {
191
+ presentableId: string;
192
+ addCollectionItems: {
193
+ presentableId: string;
194
+ }[];
195
+ }
196
+ export declare function addItemsToPresentableCollection({ presentableId, ...params }: AddItemsToPresentableCollectionParamsType): Promise<any>;
197
+ interface RemoveItemsFromPresentableCollectionParamsType {
198
+ presentableId: string;
199
+ removeCollectionItemIds: string;
200
+ }
201
+ export declare function removeItemsFromPresentableCollection({ presentableId, ...params }: RemoveItemsFromPresentableCollectionParamsType): Promise<any>;
202
+ interface GetItemsFromPresentableCollectionParamsType {
203
+ presentableId: string;
204
+ isLoadLatestVersionInfo?: 0 | 1;
205
+ skip?: number;
206
+ limit?: number;
207
+ keywords?: number;
208
+ sortField?: 'createDate' | 'sortId';
209
+ sortType?: -1 | 1;
210
+ }
211
+ export declare function getItemsFromPresentableCollection({ presentableId, ...params }: GetItemsFromPresentableCollectionParamsType): Promise<any>;
212
+ interface SetItemsSortFromPresentableCollectionManualParamsType {
213
+ presentableId: string;
214
+ sortIds: string[];
215
+ targetSortId: number;
216
+ }
217
+ export declare function setItemsSortFromPresentableCollectionManual({ presentableId, ...params }: SetItemsSortFromPresentableCollectionManualParamsType): Promise<any>;
218
+ interface SetItemsSortFromPresentableCollectionQuickParamsType {
219
+ presentableId: string;
220
+ sortIds: string[];
221
+ targetSortId: number;
222
+ }
223
+ export declare function setItemsSortFromPresentableCollectionQuick({ presentableId, ...params }: SetItemsSortFromPresentableCollectionQuickParamsType): Promise<any>;
177
224
  export {};
@@ -1033,7 +1033,12 @@ var _excluded$1 = ["presentableId"],
1033
1033
  _excluded8 = ["presentableId"],
1034
1034
  _excluded9 = ["nodeId"],
1035
1035
  _excluded10 = ["nodeId"],
1036
- _excluded11 = ["presentableId"];
1036
+ _excluded11 = ["presentableId"],
1037
+ _excluded12 = ["presentableId"],
1038
+ _excluded13 = ["presentableId"],
1039
+ _excluded14 = ["presentableId"],
1040
+ _excluded15 = ["presentableId"],
1041
+ _excluded16 = ["presentableId"];
1037
1042
  function createPresentable(params) {
1038
1043
  return FUtil.Request({
1039
1044
  method: 'POST',
@@ -1184,6 +1189,59 @@ function ignorePresentableVersionUpdateTip(_ref12) {
1184
1189
  data: params
1185
1190
  });
1186
1191
  }
1192
+ function createPresentableCollection(_ref13) {
1193
+ var params = _extends({}, (_objectDestructuringEmpty(_ref13), _ref13));
1194
+ return FUtil.Request({
1195
+ method: 'POST',
1196
+ url: "/v2/presentables/catalogues",
1197
+ data: params
1198
+ });
1199
+ }
1200
+ function addItemsToPresentableCollection(_ref14) {
1201
+ var presentableId = _ref14.presentableId,
1202
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1203
+ return FUtil.Request({
1204
+ method: 'POST',
1205
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1206
+ data: params
1207
+ });
1208
+ }
1209
+ function removeItemsFromPresentableCollection(_ref15) {
1210
+ var presentableId = _ref15.presentableId,
1211
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1212
+ return FUtil.Request({
1213
+ method: 'DELETE',
1214
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1215
+ params: params
1216
+ });
1217
+ }
1218
+ function getItemsFromPresentableCollection(_ref16) {
1219
+ var presentableId = _ref16.presentableId,
1220
+ params = _objectWithoutPropertiesLoose(_ref16, _excluded14);
1221
+ return FUtil.Request({
1222
+ method: 'GET',
1223
+ url: "/v2/presentables/catalogues/" + presentableId + "/items",
1224
+ params: params
1225
+ });
1226
+ }
1227
+ function setItemsSortFromPresentableCollectionManual(_ref17) {
1228
+ var presentableId = _ref17.presentableId,
1229
+ params = _objectWithoutPropertiesLoose(_ref17, _excluded15);
1230
+ return FUtil.Request({
1231
+ method: 'PUT',
1232
+ url: "/v2/presentables/catalogues/" + presentableId + "/manualSort",
1233
+ data: params
1234
+ });
1235
+ }
1236
+ function setItemsSortFromPresentableCollectionQuick(_ref18) {
1237
+ var presentableId = _ref18.presentableId,
1238
+ params = _objectWithoutPropertiesLoose(_ref18, _excluded16);
1239
+ return FUtil.Request({
1240
+ method: 'PUT',
1241
+ url: "/v2/presentables/catalogues/" + presentableId + "/manualSort",
1242
+ data: params
1243
+ });
1244
+ }
1187
1245
 
1188
1246
  var Exhibit = {
1189
1247
  __proto__: null,
@@ -1203,7 +1261,13 @@ var Exhibit = {
1203
1261
  batchCreatePresentable: batchCreatePresentable,
1204
1262
  batchUpdatePresentable: batchUpdatePresentable,
1205
1263
  batchUpdatePresentableStatus: batchUpdatePresentableStatus,
1206
- ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip
1264
+ ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip,
1265
+ createPresentableCollection: createPresentableCollection,
1266
+ addItemsToPresentableCollection: addItemsToPresentableCollection,
1267
+ removeItemsFromPresentableCollection: removeItemsFromPresentableCollection,
1268
+ getItemsFromPresentableCollection: getItemsFromPresentableCollection,
1269
+ setItemsSortFromPresentableCollectionManual: setItemsSortFromPresentableCollectionManual,
1270
+ setItemsSortFromPresentableCollectionQuick: setItemsSortFromPresentableCollectionQuick
1207
1271
  };
1208
1272
 
1209
1273
  var _excluded$2 = ["bucketName"],
@@ -1535,11 +1599,11 @@ var _excluded$3 = ["resourceIdOrName"],
1535
1599
  _excluded9$1 = ["resourceId"],
1536
1600
  _excluded10$1 = ["resourceId"],
1537
1601
  _excluded11$1 = ["resourceId"],
1538
- _excluded12 = ["resourceId"],
1539
- _excluded13 = ["resourceId"],
1540
- _excluded14 = ["resourceId"],
1541
- _excluded15 = ["resourceId"],
1542
- _excluded16 = ["resourceId"],
1602
+ _excluded12$1 = ["resourceId"],
1603
+ _excluded13$1 = ["resourceId"],
1604
+ _excluded14$1 = ["resourceId"],
1605
+ _excluded15$1 = ["resourceId"],
1606
+ _excluded16$1 = ["resourceId"],
1543
1607
  _excluded17 = ["resourceId"],
1544
1608
  _excluded18 = ["resourceId"],
1545
1609
  _excluded19 = ["resourceId"],
@@ -1785,7 +1849,7 @@ function cycleDependencyCheck$1(_ref13) {
1785
1849
  }
1786
1850
  function relationTree$1(_ref14) {
1787
1851
  var resourceId = _ref14.resourceId,
1788
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1852
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12$1);
1789
1853
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
1790
1854
  // params,
1791
1855
  // });
@@ -1797,7 +1861,7 @@ function relationTree$1(_ref14) {
1797
1861
  }
1798
1862
  function relationTreeAuth(_ref15) {
1799
1863
  var resourceId = _ref15.resourceId,
1800
- params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1864
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13$1);
1801
1865
  return FUtil.Request({
1802
1866
  method: 'GET',
1803
1867
  url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
@@ -1898,7 +1962,7 @@ function generateResourceNames(_ref26) {
1898
1962
  }
1899
1963
  function updateCollection(_ref27) {
1900
1964
  var resourceId = _ref27.resourceId,
1901
- params = _objectWithoutPropertiesLoose(_ref27, _excluded14);
1965
+ params = _objectWithoutPropertiesLoose(_ref27, _excluded14$1);
1902
1966
  return FUtil.Request({
1903
1967
  method: 'PUT',
1904
1968
  url: "/v2/resources/catalogue/" + resourceId,
@@ -1915,7 +1979,7 @@ function deleteCollectionUnitResource(_ref28) {
1915
1979
  }
1916
1980
  function getCollectionItems(_ref29) {
1917
1981
  var resourceId = _ref29.resourceId,
1918
- params = _objectWithoutPropertiesLoose(_ref29, _excluded15);
1982
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded15$1);
1919
1983
  return FUtil.Request({
1920
1984
  method: 'GET',
1921
1985
  url: "/v2/resources/catalogue/" + resourceId + "/items",
@@ -1924,7 +1988,7 @@ function getCollectionItems(_ref29) {
1924
1988
  }
1925
1989
  function getCollectionItems_Draft(_ref30) {
1926
1990
  var resourceId = _ref30.resourceId,
1927
- params = _objectWithoutPropertiesLoose(_ref30, _excluded16);
1991
+ params = _objectWithoutPropertiesLoose(_ref30, _excluded16$1);
1928
1992
  return FUtil.Request({
1929
1993
  method: 'GET',
1930
1994
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",