@types/ali-oss 6.16.1 → 6.16.4
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/README.md +1 -1
- ali-oss/index.d.ts +68 -1
- ali-oss/package.json +3 -3
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:
|
|
11
|
+
* Last updated: Sat, 11 Jun 2022 04:01:34 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
ali-oss/index.d.ts
CHANGED
|
@@ -163,6 +163,16 @@ declare namespace OSS {
|
|
|
163
163
|
owner?: OwnerType;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
interface BucketPolicy {
|
|
167
|
+
Version: string;
|
|
168
|
+
Statement: Array<{
|
|
169
|
+
Action: string[];
|
|
170
|
+
Effect: 'Allow' | 'Deny';
|
|
171
|
+
Principal: string[];
|
|
172
|
+
Resource: string[];
|
|
173
|
+
}>;
|
|
174
|
+
}
|
|
175
|
+
|
|
166
176
|
interface NormalSuccessResponse {
|
|
167
177
|
/** response status */
|
|
168
178
|
status: number;
|
|
@@ -175,7 +185,11 @@ declare namespace OSS {
|
|
|
175
185
|
rt: number;
|
|
176
186
|
}
|
|
177
187
|
|
|
178
|
-
|
|
188
|
+
/**
|
|
189
|
+
* @see x-oss-meta-* in https://help.aliyun.com/document_detail/31978.html for Aliyun user
|
|
190
|
+
* @see x-oss-meta-* in https://www.alibabacloud.com/help/en/doc-detail/31978.html for AlibabaCloud user
|
|
191
|
+
*/
|
|
192
|
+
interface UserMeta extends Record<string, string | number> {
|
|
179
193
|
uid: number;
|
|
180
194
|
pid: number;
|
|
181
195
|
}
|
|
@@ -241,6 +255,7 @@ declare namespace OSS {
|
|
|
241
255
|
/** the remote addr */
|
|
242
256
|
RemoteAddr: string;
|
|
243
257
|
}
|
|
258
|
+
|
|
244
259
|
// parameters type
|
|
245
260
|
interface ListBucketsQueryType {
|
|
246
261
|
/** search buckets using prefix key */
|
|
@@ -615,6 +630,18 @@ declare namespace OSS {
|
|
|
615
630
|
/** the operation timeout */
|
|
616
631
|
timeout?: number | undefined;
|
|
617
632
|
}
|
|
633
|
+
|
|
634
|
+
interface GetBucketPolicyResult {
|
|
635
|
+
policy: BucketPolicy | null;
|
|
636
|
+
status: number;
|
|
637
|
+
res: NormalSuccessResponse;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
interface PostObjectParams {
|
|
641
|
+
policy: string;
|
|
642
|
+
OSSAccessKeyId: string;
|
|
643
|
+
Signature: string;
|
|
644
|
+
}
|
|
618
645
|
}
|
|
619
646
|
|
|
620
647
|
// cluster
|
|
@@ -915,6 +942,35 @@ declare class OSS {
|
|
|
915
942
|
*/
|
|
916
943
|
deleteBucketCORS(name: string): Promise<OSS.NormalSuccessResponse>;
|
|
917
944
|
|
|
945
|
+
// policy operations
|
|
946
|
+
/**
|
|
947
|
+
* Adds or modify policy for a bucket.
|
|
948
|
+
*/
|
|
949
|
+
putBucketPolicy(
|
|
950
|
+
name: string,
|
|
951
|
+
policy: OSS.BucketPolicy,
|
|
952
|
+
options?: OSS.RequestOptions
|
|
953
|
+
): Promise<{
|
|
954
|
+
status: number,
|
|
955
|
+
res: OSS.NormalSuccessResponse,
|
|
956
|
+
}>;
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* Obtains the policy for a bucket.
|
|
960
|
+
*/
|
|
961
|
+
getBucketPolicy(name: string, options?: OSS.RequestOptions): Promise<OSS.GetBucketPolicyResult>;
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Deletes the policy added for a bucket.
|
|
965
|
+
*/
|
|
966
|
+
deleteBucketPolicy(
|
|
967
|
+
name: string,
|
|
968
|
+
options?: OSS.RequestOptions
|
|
969
|
+
): Promise<{
|
|
970
|
+
status: number,
|
|
971
|
+
res: OSS.NormalSuccessResponse,
|
|
972
|
+
}>;
|
|
973
|
+
|
|
918
974
|
/********************************************************** Object operations ********************************************/
|
|
919
975
|
/**
|
|
920
976
|
* List objects in the bucket.
|
|
@@ -974,6 +1030,7 @@ declare class OSS {
|
|
|
974
1030
|
* Copy an object from sourceName to name.
|
|
975
1031
|
*/
|
|
976
1032
|
copy(name: string, sourceName: string, options?: OSS.CopyObjectOptions): Promise<OSS.CopyAndPutMetaResult>;
|
|
1033
|
+
copy(name: string, sourceName: string, sourceBucket?: string, options?: OSS.CopyObjectOptions): Promise<OSS.CopyAndPutMetaResult>;
|
|
977
1034
|
|
|
978
1035
|
/**
|
|
979
1036
|
* Set an exists object meta.
|
|
@@ -1086,6 +1143,16 @@ declare class OSS {
|
|
|
1086
1143
|
options?: OSS.RequestOptions,
|
|
1087
1144
|
): Promise<OSS.NormalSuccessResponse>;
|
|
1088
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* get postObject params.
|
|
1148
|
+
*/
|
|
1149
|
+
calculatePostSignature(
|
|
1150
|
+
/**
|
|
1151
|
+
* policy config object or JSON string
|
|
1152
|
+
*/
|
|
1153
|
+
policy: object | string
|
|
1154
|
+
): OSS.PostObjectParams;
|
|
1155
|
+
|
|
1089
1156
|
/************************************************ RTMP Operations *************************************************************/
|
|
1090
1157
|
/**
|
|
1091
1158
|
* Create a live channel.
|
ali-oss/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/ali-oss",
|
|
3
|
-
"version": "6.16.
|
|
3
|
+
"version": "6.16.4",
|
|
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": "
|
|
24
|
-
"typeScriptVersion": "
|
|
23
|
+
"typesPublisherContentHash": "befcdfe9fc56cb38540c83b3c9fe3205bc6f1aefc47c277e7f2795e70811b157",
|
|
24
|
+
"typeScriptVersion": "4.0"
|
|
25
25
|
}
|