Skip to content

Commit

Permalink
fix type declare
Browse files Browse the repository at this point in the history
- return type of deleteBucketEvent
- parameter callbackURL of putBucketEvent and updateBucketEvent
  • Loading branch information
lihsai0 committed Apr 16, 2024
1 parent 4e55616 commit 113d646
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ export declare namespace rs {
* @param options - 配置项
* @param options.name - 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
* @param options.event - 事件类型,接受数组设置多个
* @param options.callbackUrl - 事件通知回调 URL,接受数组设置多个,失败依次重试
* @param options.callbackURL - 事件通知回调 URL,接受数组设置多个,失败依次重试
* @param options.prefix - 可选,文件配置的前缀
* @param options.suffix - 可选,文件配置的后缀
* @param options.access_key - 可选,设置的话会对通知请求用对应的ak、sk进行签名
Expand All @@ -1389,7 +1389,7 @@ export declare namespace rs {
options: {
name: string,
event: BucketEventName | BucketEventName[],
callbackUrl: string | string[],
callbackURL: string | string[],
prefix?: string,
suffix?: string,
access_key?: string,
Expand All @@ -1405,7 +1405,7 @@ export declare namespace rs {
* @param options - 配置项
* @param options.name - 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
* @param options.event - 事件类型,接受数组设置多个
* @param options.callbackUrl - 事件通知回调 URL,接受数组设置多个,失败依次重试
* @param options.callbackURL - 事件通知回调 URL,接受数组设置多个,失败依次重试
* @param options.prefix - 可选,文件配置的前缀
* @param options.suffix - 可选,文件配置的后缀
* @param options.access_key - 可选,设置的话会对通知请求用对应的ak、sk进行签名
Expand All @@ -1417,7 +1417,7 @@ export declare namespace rs {
options: {
name: string,
event?: BucketEventName | BucketEventName[],
callbackUrl?: string | string[],
callbackURL?: string | string[],
prefix?: string,
suffix?: string,
access_key?: string,
Expand All @@ -1443,8 +1443,7 @@ export declare namespace rs {
* @param name - 规则名称
* @param callbackFunc - 回调函数
*/
deleteBucketEvent(bucket: string, name: string, callbackFunc?: callback): void

deleteBucketEvent(bucket: string, name: string, callbackFunc?: callback): Promise<httpc.ResponseWrapper<void>>;

/**
* @param bucket - 空间名
Expand Down
4 changes: 2 additions & 2 deletions qiniu/storage/rs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ BucketManager.prototype.getBucketLifecycleRule = function (bucket, callbackFunc)
* @param {Object} options
* @param {string} options.name
* @param {string} options.event
* @param {string} options.callbackURL
* @param {string | string[]} options.callbackURL
* @param {string} [options.prefix]
* @param {string} [options.suffix]
* @param {string} [options.access_key]
Expand Down Expand Up @@ -1203,7 +1203,7 @@ BucketManager.prototype.putBucketEvent = function (bucket, options, callbackFunc
* @param {string} [options.prefix]
* @param {string} [options.suffix]
* @param {string} [options.event]
* @param {string} [options.callbackURL]
* @param {string | string[]} [options.callbackURL]
* @param {string} [options.access_key]
* @param {string} [options.host]
* @param {BucketOperationCallback} [callbackFunc]
Expand Down

0 comments on commit 113d646

Please sign in to comment.