@freelog/tools-lib 0.1.106 → 0.1.107

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.
@@ -29,7 +29,7 @@ interface IResourceInfo {
29
29
  }
30
30
  export interface CreateParamsType {
31
31
  name: string;
32
- resourceType: string;
32
+ resourceType: string[];
33
33
  policies?: any[];
34
34
  coverImages?: string[];
35
35
  intro?: string;
@@ -90,7 +90,7 @@ interface UpdateObjectParamsType {
90
90
  type: string;
91
91
  versionRange?: string;
92
92
  }[];
93
- resourceType?: string;
93
+ resourceType?: string[];
94
94
  }
95
95
  export declare function updateObject({ objectIdOrName, ...params }: UpdateObjectParamsType): Promise<any>;
96
96
  interface BatchObjectListParamsType {
@@ -101,7 +101,6 @@ interface BatchObjectListParamsType {
101
101
  export declare function batchObjectList(params: BatchObjectListParamsType): Promise<any>;
102
102
  interface FilePropertyParamsType {
103
103
  sha1: string;
104
- resourceType: string;
105
104
  }
106
105
  export declare function fileProperty({ sha1, ...params }: FilePropertyParamsType): Promise<any>;
107
106
  interface CycleDependencyCheckParamsType {
@@ -896,6 +896,10 @@ function completeUrlByDomain(domain) {
896
896
  function policyCodeTranslationToText(_x, _x2) {
897
897
  return _policyCodeTranslationToText.apply(this, arguments);
898
898
  }
899
+ /**
900
+ * 将资源类型关键字数组,转换成标准展示文字
901
+ * @param arr 关键字数组
902
+ */
899
903
 
900
904
  function _policyCodeTranslationToText() {
901
905
  _policyCodeTranslationToText = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(code, targetType) {
@@ -950,12 +954,17 @@ function _policyCodeTranslationToText() {
950
954
  return _policyCodeTranslationToText.apply(this, arguments);
951
955
  }
952
956
 
957
+ function resourceTypeKeyArrToResourceType(arr) {
958
+ return arr.join(' / ');
959
+ }
960
+
953
961
  var Format = {
954
962
  __proto__: null,
955
963
  humanizeSize: humanizeSize,
956
964
  formatDateTime: formatDateTime,
957
965
  completeUrlByDomain: completeUrlByDomain,
958
- policyCodeTranslationToText: policyCodeTranslationToText
966
+ policyCodeTranslationToText: policyCodeTranslationToText,
967
+ resourceTypeKeyArrToResourceType: resourceTypeKeyArrToResourceType
959
968
  };
960
969
 
961
970
  // 展品名称
@@ -1734,7 +1743,7 @@ function updateObject(_ref5) {
1734
1743
 
1735
1744
  return FUtil.Request({
1736
1745
  method: 'PUT',
1737
- url: "/v1/storages/objects/" + objectIdOrName,
1746
+ url: "/v2/storages/objects/" + objectIdOrName,
1738
1747
  data: params
1739
1748
  });
1740
1749
  }