@types/ali-oss 6.16.7 → 6.16.9

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.
ali-oss/LICENSE CHANGED
File without changes
ali-oss/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for ali-oss (https://github.com/aliyun/os
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ali-oss.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 06 Dec 2022 05:33:01 GMT
11
+ * Last updated: Fri, 22 Sep 2023 18:11:03 GMT
12
12
  * Dependencies: none
13
13
  * Global values: none
14
14
 
ali-oss/index.d.ts CHANGED
@@ -32,7 +32,7 @@ declare namespace OSS {
32
32
  /** use time (ms) of refresh STSToken interval it should be less than sts info expire interval, default is 300000ms(5min) when sts info expires. */
33
33
  refreshSTSTokenInterval?: number;
34
34
  /** used by auto set stsToken、accessKeyId、accessKeySecret when sts info expires. return value must be object contains stsToken、accessKeyId、accessKeySecret */
35
- refreshSTSToken?: () => Promise<{ accessKeyId: string, accessKeySecret: string, stsToken: string }>;
35
+ refreshSTSToken?: () => Promise<{ accessKeyId: string; accessKeySecret: string; stsToken: string }>;
36
36
  }
37
37
 
38
38
  /**
@@ -100,20 +100,20 @@ declare namespace OSS {
100
100
  StorageClass: StorageType;
101
101
  }
102
102
 
103
- type StorageType = 'Standard' | 'IA' | 'Archive';
103
+ type StorageType = "Standard" | "IA" | "Archive";
104
104
 
105
- type ACLType = 'public-read-write' | 'public-read' | 'private';
105
+ type ACLType = "public-read-write" | "public-read" | "private";
106
106
 
107
- type HTTPMethods = 'GET' | 'POST' | 'DELETE' | 'PUT';
107
+ type HTTPMethods = "GET" | "POST" | "DELETE" | "PUT";
108
108
 
109
- type RedundancyType = 'LRS' | 'ZRS';
109
+ type RedundancyType = "LRS" | "ZRS";
110
110
 
111
111
  interface RequestOptions {
112
112
  // the operation timeout
113
113
  timeout?: number | undefined;
114
114
  }
115
115
 
116
- type RuleStatusType = 'Enabled' | 'Disabled';
116
+ type RuleStatusType = "Enabled" | "Disabled";
117
117
 
118
118
  interface LifecycleRule {
119
119
  /** rule id, if not set, OSS will auto create it with random string. */
@@ -167,7 +167,7 @@ declare namespace OSS {
167
167
  Version: string;
168
168
  Statement: Array<{
169
169
  Action: string[];
170
- Effect: 'Allow' | 'Deny';
170
+ Effect: "Allow" | "Deny";
171
171
  Principal: string[];
172
172
  Resource: string[];
173
173
  }>;
@@ -263,7 +263,7 @@ declare namespace OSS {
263
263
  /** search start from marker, including marker key */
264
264
  marker?: string | undefined;
265
265
  /** max buckets, default is 100, limit to 1000 */
266
- 'max-keys'?: string | number | undefined;
266
+ "max-keys"?: string | number | undefined;
267
267
  }
268
268
 
269
269
  interface PutBucketOptions {
@@ -288,29 +288,29 @@ declare namespace OSS {
288
288
  /** only search current dir, not including subdir */
289
289
  delimiter?: string | undefined; // delimiter search scope e.g.
290
290
  /** max objects, default is 100, limit to 1000 */
291
- 'max-keys': string | number;
291
+ "max-keys": string | number;
292
292
  /** Specifies that the object names in the response are URL-encoded. */
293
- 'encoding-type'?: 'url' | '';
293
+ "encoding-type"?: "url" | "";
294
294
  }
295
295
 
296
296
  interface ListV2ObjectsQuery {
297
297
  /** search object using prefix key */
298
298
  prefix?: string;
299
299
  /** search start from token, including token key */
300
- 'continuation-token'?: string;
300
+ "continuation-token"?: string;
301
301
  /** only search current dir, not including subdir */
302
302
  delimiter?: string | number;
303
303
  /** max objects, default is 100, limit to 1000 */
304
- 'max-keys'?: string;
304
+ "max-keys"?: string;
305
305
  /**
306
306
  * The name of the object from which the list operation begins.
307
307
  * If this parameter is specified, objects whose names are alphabetically greater than the start-after parameter value are returned.
308
308
  */
309
- 'start-after'?: string;
309
+ "start-after"?: string;
310
310
  /** Specifies whether to include the information about object owners in the response. */
311
- 'fetch-owner'?: boolean;
311
+ "fetch-owner"?: boolean;
312
312
  /** Specifies that the object names in the response are URL-encoded. */
313
- 'encoding-type'?: 'url' | '';
313
+ "encoding-type"?: "url" | "";
314
314
  }
315
315
 
316
316
  interface ListObjectResult {
@@ -420,6 +420,10 @@ declare namespace OSS {
420
420
  res: NormalSuccessResponse;
421
421
  }
422
422
 
423
+ interface DeleteResult {
424
+ res: NormalSuccessResponse;
425
+ }
426
+
423
427
  interface DeleteMultiOptions {
424
428
  /** quite mode or verbose mode, default is false */
425
429
  quiet?: boolean | undefined;
@@ -433,9 +437,9 @@ declare namespace OSS {
433
437
  }
434
438
 
435
439
  interface ResponseHeaderType {
436
- 'content-type'?: string | undefined;
437
- 'content-disposition'?: string | undefined;
438
- 'cache-control'?: string | undefined;
440
+ "content-type"?: string | undefined;
441
+ "content-disposition"?: string | undefined;
442
+ "cache-control"?: string | undefined;
439
443
  }
440
444
 
441
445
  interface SignatureUrlOptions {
@@ -444,7 +448,7 @@ declare namespace OSS {
444
448
  /** the HTTP method, default is 'GET' */
445
449
  method?: HTTPMethods | undefined;
446
450
  /** set the request content type */
447
- 'Content-Type'?: string | undefined;
451
+ "Content-Type"?: string | undefined;
448
452
  /** image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} */
449
453
  process?: string | undefined;
450
454
  /** traffic limit, range: 819200~838860800 */
@@ -546,11 +550,11 @@ declare namespace OSS {
546
550
 
547
551
  interface ListPartsQuery {
548
552
  /** The maximum part number in the response of the OSS. default value: 1000. */
549
- 'max-parts': number;
553
+ "max-parts": number;
550
554
  /** Starting position of a specific list. A part is listed only when the part number is greater than the value of this parameter. */
551
- 'part-number-marker': number;
555
+ "part-number-marker": number;
552
556
  /** Specify the encoding of the returned content and the encoding type. Optional value: url */
553
- 'encoding-type': string;
557
+ "encoding-type": string;
554
558
  }
555
559
 
556
560
  interface ListPartsResult {
@@ -567,9 +571,9 @@ declare namespace OSS {
567
571
 
568
572
  interface ListUploadsQuery {
569
573
  prefix?: string | undefined;
570
- 'max-uploads'?: number | undefined;
571
- 'key-marker'?: string | undefined;
572
- 'upload-id-marker'?: string | undefined;
574
+ "max-uploads"?: number | undefined;
575
+ "key-marker"?: string | undefined;
576
+ "upload-id-marker"?: string | undefined;
573
577
  }
574
578
 
575
579
  interface ListUploadsResult {
@@ -613,7 +617,7 @@ declare namespace OSS {
613
617
  /** the channel id marker (returns channels after this id) */
614
618
  marker: string;
615
619
  /** max number of channels to return */
616
- 'max-keys ': number;
620
+ "max-keys ": number;
617
621
  }
618
622
 
619
623
  interface ListChannelsResult {
@@ -687,7 +691,7 @@ declare namespace OSS {
687
691
 
688
692
  getStream(name?: string, options?: GetStreamOptions): Promise<GetStreamResult>;
689
693
 
690
- delete(name: string, options?: RequestOptions): Promise<NormalSuccessResponse>;
694
+ delete(name: string, options?: RequestOptions): Promise<DeleteResult>;
691
695
 
692
696
  copy(name: string, sourceName: string, options?: CopyObjectOptions): Promise<CopyAndPutMetaResult>;
693
697
 
@@ -962,10 +966,10 @@ declare class OSS {
962
966
  putBucketPolicy(
963
967
  name: string,
964
968
  policy: OSS.BucketPolicy,
965
- options?: OSS.RequestOptions
969
+ options?: OSS.RequestOptions,
966
970
  ): Promise<{
967
- status: number,
968
- res: OSS.NormalSuccessResponse,
971
+ status: number;
972
+ res: OSS.NormalSuccessResponse;
969
973
  }>;
970
974
 
971
975
  /**
@@ -978,10 +982,10 @@ declare class OSS {
978
982
  */
979
983
  deleteBucketPolicy(
980
984
  name: string,
981
- options?: OSS.RequestOptions
985
+ options?: OSS.RequestOptions,
982
986
  ): Promise<{
983
- status: number,
984
- res: OSS.NormalSuccessResponse,
987
+ status: number;
988
+ res: OSS.NormalSuccessResponse;
985
989
  }>;
986
990
 
987
991
  /********************************************************** Object operations ********************************************/
@@ -1042,13 +1046,18 @@ declare class OSS {
1042
1046
  /**
1043
1047
  * Delete an object from the bucket.
1044
1048
  */
1045
- delete(name: string, options?: OSS.RequestOptions): Promise<OSS.NormalSuccessResponse>;
1049
+ delete(name: string, options?: OSS.RequestOptions): Promise<OSS.DeleteResult>;
1046
1050
 
1047
1051
  /**
1048
1052
  * Copy an object from sourceName to name.
1049
1053
  */
1050
1054
  copy(name: string, sourceName: string, options?: OSS.CopyObjectOptions): Promise<OSS.CopyAndPutMetaResult>;
1051
- copy(name: string, sourceName: string, sourceBucket?: string, options?: OSS.CopyObjectOptions): Promise<OSS.CopyAndPutMetaResult>;
1055
+ copy(
1056
+ name: string,
1057
+ sourceName: string,
1058
+ sourceBucket?: string,
1059
+ options?: OSS.CopyObjectOptions,
1060
+ ): Promise<OSS.CopyAndPutMetaResult>;
1052
1061
 
1053
1062
  /**
1054
1063
  * Set an exists object meta.
@@ -1173,7 +1182,7 @@ declare class OSS {
1173
1182
  /**
1174
1183
  * policy config object or JSON string
1175
1184
  */
1176
- policy: object | string
1185
+ policy: object | string,
1177
1186
  ): OSS.PostObjectParams;
1178
1187
 
1179
1188
  /************************************************ RTMP Operations *************************************************************/
ali-oss/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/ali-oss",
3
- "version": "6.16.7",
3
+ "version": "6.16.9",
4
4
  "description": "TypeScript definitions for ali-oss",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ali-oss",
6
6
  "license": "MIT",
@@ -20,6 +20,6 @@
20
20
  },
21
21
  "scripts": {},
22
22
  "dependencies": {},
23
- "typesPublisherContentHash": "bed8cb3cf3410c91d8c468ff2a235f11b8c5d79f802894dc3bb5a65822fa1aa0",
24
- "typeScriptVersion": "4.2"
23
+ "typesPublisherContentHash": "1442b39a27c64451177e20facc060241662a49e9f8da8158381c4d059a0f302b",
24
+ "typeScriptVersion": "4.5"
25
25
  }