Skip to content

Commit ae6c731

Browse files
committed
upd:d.ts
1 parent 31b1cd2 commit ae6c731

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

demo/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ function getSnapshot() {
18241824
CIExample2: '对云上数据进行图片处理',
18251825
CIExample3: '下载时使用图片处理',
18261826
CIExample4: '生成带图片处理参数的签名 URL',
1827-
describeMediaBuckets: '查询媒体处理开通情况 ',
1827+
describeMediaBuckets: '查询媒体处理开通情况',
18281828
getMediaInfo: '获取媒体文件信息',
18291829
getSnapshot: '获取媒体文件某个时间的截图',
18301830
};

index.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,6 +1831,22 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
18311831
Expires?: number,
18321832
}
18331833

1834+
// request
1835+
/** request 接口参数 */
1836+
interface RequestParams extends BucketParams {
1837+
/** 操作方法,如 get,post,delete, head 等 HTTP 方法 */
1838+
Method: string,
1839+
/** 请求的对象键,最前面不带 / */
1840+
Key?: Key,
1841+
/** 请求里的 Url Query 参数 */
1842+
Query?: Query,
1843+
/** 请求里的 Body 参数 */
1844+
Body?: Body | string,
1845+
/** 请求的 API 动作接口(可理解为不带 = 的 Query 参数),如 acl、tagging、image_process 等 */
1846+
Action?: Action,
1847+
/** 请求url */
1848+
Url?: string,
1849+
}
18341850
/** Request 接口返回值 */
18351851
interface RequestResult extends GeneralResult {
18361852
Body?: Buffer,
@@ -2226,6 +2242,10 @@ declare class COS {
22262242
/** 获取文件下载链接 @see https://cloud.tencent.com/document/product/436/35651 */
22272243
getObjectUrl(params: COS.GetObjectUrlParams, callback: (err: COS.CosError, data: COS.GetObjectUrlResult) => void): string;
22282244

2245+
/** cos.request */
2246+
request(params: COS.RequestParams, callback: (err: COS.CosError, data: COS.RequestResult) => void): void;
2247+
request(params: COS.RequestParams): Promise<COS.RequestResult>;
2248+
22292249
/** 追加上传 @see https://cloud.tencent.com/document/product/436/7741 */
22302250
appendObject(params: COS.AppendObjectParams, callback: (err: COS.CosError, data: COS.GeneralResult) => void): void;
22312251
appendObject(params: COS.AppendObjectParams): Promise<COS.GeneralResult>;

0 commit comments

Comments
 (0)