Skip to content

Commit 964e835

Browse files
authored
upd 补充d.ts (#152)
Co-authored-by: chrisftian <[email protected]>
1 parent 752b7b8 commit 964e835

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Diff for: index.d.ts

+9-5
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ declare namespace COS {
547547
/** 存储桶跨域资源共享(CORS)访问控制规则 */
548548
CORSRules: CORSRule[],
549549
/** 是否允许同一个 url 有多份缓存,如果设置为 true 浏览器在 img 标签加载和 ajax 加载同一个对象 url 将会使用不同缓存 */
550-
ResponseVary?: Boolean | String,
550+
ResponseVary?: BooleanString,
551551
}
552552
/** putBucketCors 接口返回值 */
553553
interface PutBucketCorsResult extends GeneralResult {
@@ -563,7 +563,7 @@ declare namespace COS {
563563
/** 存储桶跨域资源共享(CORS)访问控制规则 */
564564
CORSRules: Record<string, any>,
565565
/** 是否允许同一个 url 有多份缓存,如果设置为 true 浏览器在 img 标签加载和 ajax 加载同一个对象 url 将会使用不同缓存 */
566-
ResponseVary?: Boolean | String,
566+
ResponseVary?: BooleanString,
567567
}
568568

569569
// deleteBucketCors
@@ -1230,6 +1230,8 @@ declare namespace COS {
12301230
onTaskStart?: (TaskInfo: COS.Task) => void,
12311231
/** 上传的进度回调方法 */
12321232
onProgress?: onProgress,
1233+
/** 续传校验的进度回调方法 */
1234+
onHashProgress?: onProgress,
12331235
}
12341236
/** putObject 接口返回值 */
12351237
interface PutObjectResult extends GeneralResult {
@@ -1731,7 +1733,7 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
17311733
/** 上传的进度回调方法 */
17321734
onProgress?: onProgress,
17331735
/** 上传完成回调方法 */
1734-
onFileFinish?: (err: Error, data?: Record<string, any>) => void,
1736+
onFileFinish?: onFileFinish,
17351737
}
17361738
/** 要上传的单个文件参数 */
17371739
interface UploadFileItemResult extends GeneralResult {
@@ -1750,7 +1752,7 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
17501752
/** 所有文件整体上传进度回调方法 */
17511753
onProgress?: onProgress,
17521754
/** 所有文件上传完成回调方法 */
1753-
onFileFinish?: (err: CosError, data?: Record<string, any>) => void,
1755+
onFileFinish?: onFileFinish,
17541756
}
17551757
/** uploadFiles 接口返回值 */
17561758
interface UploadFilesResult extends GeneralResult {
@@ -1803,6 +1805,7 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
18031805
CopySliceSize?: number,
18041806
/** 使用 sliceCopyFile 分块复制文件时,每片的大小字节数,默认值10485760(10MB) */
18051807
CopyChunkSize?: number,
1808+
SliceSize?: number,
18061809
/** 分片复制进度回调方法 */
18071810
onProgress: onProgress
18081811
}
@@ -1848,7 +1851,7 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
18481851
/** 请求里的 Url Query 参数 */
18491852
Query?: Query,
18501853
/** 请求里的 Body 参数 */
1851-
Body?: Body,
1854+
Body?: Body | string,
18521855
/** 请求的 API 动作接口(可理解为不带 = 的 Query 参数),如 acl、tagging、image_process 等 */
18531856
Action?: Action,
18541857
/** 请求url */
@@ -1857,6 +1860,7 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
18571860
RawBody?: boolean,
18581861
/** 返回文件内容格式,如string、blob、arraybuffer */
18591862
DataType?: string,
1863+
ContentType?: string,
18601864
}
18611865
/** Request 接口返回值 */
18621866
interface RequestResult extends GeneralResult {

0 commit comments

Comments
 (0)