Skip to content

Commit

Permalink
fix revised comments
Browse files Browse the repository at this point in the history
  • Loading branch information
prakashsvmx committed Sep 14, 2023
1 parent e014662 commit 8d3adc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/internal/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,8 @@ export class TypedClient {
await this.makeRequestAsyncOmit({ method, bucketName, query }, '', [200, 204], '')
}

setBucketReplication(bucketName: string, replicationConfig: ReplicationConfigOpts, callback: NoResultCallback): void
setBucketReplication(bucketName: string, replicationConfig: ReplicationConfigOpts): void
async setBucketReplication(bucketName: string, replicationConfig: ReplicationConfigOpts): Promise<void>
async setBucketReplication(bucketName: string, replicationConfig: ReplicationConfigOpts) {
if (!isValidBucketName(bucketName)) {
throw new errors.InvalidBucketNameError('Invalid bucket name: ' + bucketName)
Expand Down Expand Up @@ -1020,7 +1021,8 @@ export class TypedClient {
await this.makeRequestAsyncOmit({ method, bucketName, query, headers }, payload)
}

getBucketReplication(bucketName: string, callback: ResultCallback<ReplicationConfig>): void
getBucketReplication(bucketName: string): void
async getBucketReplication(bucketName: string): Promise<ReplicationConfig>
async getBucketReplication(bucketName: string) {
if (!isValidBucketName(bucketName)) {
throw new errors.InvalidBucketNameError('Invalid bucket name: ' + bucketName)
Expand Down Expand Up @@ -1071,12 +1073,7 @@ export class TypedClient {
return parseObjectLegalHoldConfig(strRes)
}

setObjectLegalHold(
bucketName: string,
objectName: string,
setOpts?: PutObjectLegalHoldOptions,
callback?: NoResultCallback,
): void
setObjectLegalHold(bucketName: string, objectName: string, setOpts?: PutObjectLegalHoldOptions): void
async setObjectLegalHold(
bucketName: string,
objectName: string,
Expand Down
4 changes: 3 additions & 1 deletion src/internal/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ export type ResultCallback<T> = (error: Error | null, result: T) => void
export type GetObjectLegalHoldOptions = {
versionId: string
}

/**
* @deprecated keep for backward compatible, use `LEGAL_HOLD_STATUS` instead
*/
export type LegalHoldStatus = LEGAL_HOLD_STATUS

export type PutObjectLegalHoldOptions = {
Expand Down

0 comments on commit 8d3adc2

Please sign in to comment.