@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.
@@ -22,3 +22,8 @@ export declare function policyCodeTranslationToText(code: string, targetType: st
22
22
  error: string[] | null;
23
23
  text?: string;
24
24
  }>;
25
+ /**
26
+ * 将资源类型关键字数组,转换成标准展示文字
27
+ * @param arr 关键字数组
28
+ */
29
+ export declare function resourceTypeKeyArrToResourceType(arr: string[]): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freelog/tools-lib",
3
- "version": "0.1.106",
3
+ "version": "0.1.107",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -33,7 +33,7 @@ interface IResourceInfo {
33
33
  // 创建资源
34
34
  export interface CreateParamsType {
35
35
  name: string;
36
- resourceType: string;
36
+ resourceType: string[]
37
37
  policies?: any[];
38
38
  coverImages?: string[];
39
39
  intro?: string;
@@ -272,13 +272,13 @@ interface UpdateObjectParamsType {
272
272
  type: string;
273
273
  versionRange?: string;
274
274
  }[];
275
- resourceType?: string;
275
+ resourceType?: string[];
276
276
  }
277
277
 
278
278
  export function updateObject({objectIdOrName, ...params}: UpdateObjectParamsType) {
279
279
  return FUtil.Request({
280
280
  method: 'PUT',
281
- url: `/v1/storages/objects/${objectIdOrName}`,
281
+ url: `/v2/storages/objects/${objectIdOrName}`,
282
282
  data: params,
283
283
  });
284
284
  }
@@ -301,7 +301,7 @@ export function batchObjectList(params: BatchObjectListParamsType) {
301
301
  // 根据sha1和类型获取文件属性
302
302
  interface FilePropertyParamsType {
303
303
  sha1: string;
304
- resourceType: string;
304
+ // resourceType: string;
305
305
  }
306
306
 
307
307
  export function fileProperty({sha1, ...params}: FilePropertyParamsType) {
@@ -87,3 +87,12 @@ export async function policyCodeTranslationToText(code: string, targetType: stri
87
87
  };
88
88
  }
89
89
  }
90
+
91
+
92
+ /**
93
+ * 将资源类型关键字数组,转换成标准展示文字
94
+ * @param arr 关键字数组
95
+ */
96
+ export function resourceTypeKeyArrToResourceType(arr: string[]): string {
97
+ return arr.join(' / ');
98
+ }