Skip to content

Commit 113d646

Browse files
committed
fix type declare
- return type of deleteBucketEvent - parameter callbackURL of putBucketEvent and updateBucketEvent
1 parent 4e55616 commit 113d646

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

index.d.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ export declare namespace rs {
13771377
* @param options - 配置项
13781378
* @param options.name - 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
13791379
* @param options.event - 事件类型,接受数组设置多个
1380-
* @param options.callbackUrl - 事件通知回调 URL,接受数组设置多个,失败依次重试
1380+
* @param options.callbackURL - 事件通知回调 URL,接受数组设置多个,失败依次重试
13811381
* @param options.prefix - 可选,文件配置的前缀
13821382
* @param options.suffix - 可选,文件配置的后缀
13831383
* @param options.access_key - 可选,设置的话会对通知请求用对应的ak、sk进行签名
@@ -1389,7 +1389,7 @@ export declare namespace rs {
13891389
options: {
13901390
name: string,
13911391
event: BucketEventName | BucketEventName[],
1392-
callbackUrl: string | string[],
1392+
callbackURL: string | string[],
13931393
prefix?: string,
13941394
suffix?: string,
13951395
access_key?: string,
@@ -1405,7 +1405,7 @@ export declare namespace rs {
14051405
* @param options - 配置项
14061406
* @param options.name - 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
14071407
* @param options.event - 事件类型,接受数组设置多个
1408-
* @param options.callbackUrl - 事件通知回调 URL,接受数组设置多个,失败依次重试
1408+
* @param options.callbackURL - 事件通知回调 URL,接受数组设置多个,失败依次重试
14091409
* @param options.prefix - 可选,文件配置的前缀
14101410
* @param options.suffix - 可选,文件配置的后缀
14111411
* @param options.access_key - 可选,设置的话会对通知请求用对应的ak、sk进行签名
@@ -1417,7 +1417,7 @@ export declare namespace rs {
14171417
options: {
14181418
name: string,
14191419
event?: BucketEventName | BucketEventName[],
1420-
callbackUrl?: string | string[],
1420+
callbackURL?: string | string[],
14211421
prefix?: string,
14221422
suffix?: string,
14231423
access_key?: string,
@@ -1443,8 +1443,7 @@ export declare namespace rs {
14431443
* @param name - 规则名称
14441444
* @param callbackFunc - 回调函数
14451445
*/
1446-
deleteBucketEvent(bucket: string, name: string, callbackFunc?: callback): void
1447-
1446+
deleteBucketEvent(bucket: string, name: string, callbackFunc?: callback): Promise<httpc.ResponseWrapper<void>>;
14481447

14491448
/**
14501449
* @param bucket - 空间名

qiniu/storage/rs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ BucketManager.prototype.getBucketLifecycleRule = function (bucket, callbackFunc)
11511151
* @param {Object} options
11521152
* @param {string} options.name
11531153
* @param {string} options.event
1154-
* @param {string} options.callbackURL
1154+
* @param {string | string[]} options.callbackURL
11551155
* @param {string} [options.prefix]
11561156
* @param {string} [options.suffix]
11571157
* @param {string} [options.access_key]
@@ -1203,7 +1203,7 @@ BucketManager.prototype.putBucketEvent = function (bucket, options, callbackFunc
12031203
* @param {string} [options.prefix]
12041204
* @param {string} [options.suffix]
12051205
* @param {string} [options.event]
1206-
* @param {string} [options.callbackURL]
1206+
* @param {string | string[]} [options.callbackURL]
12071207
* @param {string} [options.access_key]
12081208
* @param {string} [options.host]
12091209
* @param {BucketOperationCallback} [callbackFunc]

0 commit comments

Comments
 (0)