Skip to content

Commit

Permalink
Introduce ListObjectsOpts and use it (minio#1106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent FAYOLLE authored and fflorent committed Jul 18, 2023
1 parent 54a1ca2 commit 97b9587
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/internal/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ export type S3ListObject =
isLatest?: boolean
}

export type ListObjectsOpts = {
MaxKeys?: number
IncludeVersion?: boolean
}

export type StatObjectOpts = {
versionId?: string
}
Expand Down
9 changes: 8 additions & 1 deletion src/minio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import type {
Lifecycle,
LifecycleConfig,
LifecycleRule,
ListObjectsOpts,
Lock,
LockConfig,
MakeBucketOpt,
Expand Down Expand Up @@ -87,6 +88,7 @@ export type {
Lifecycle,
LifecycleConfig,
LifecycleRule,
ListObjectsOpts,
Lock,
LockConfig,
MakeBucketOpt,
Expand Down Expand Up @@ -164,7 +166,12 @@ export class Client extends TypedClient {
bucketExists(bucketName: string, callback: ResultCallback<boolean>): void
bucketExists(bucketName: string): Promise<boolean>

listObjects(bucketName: string, prefix?: string, recursive?: boolean): BucketStream<S3ListObject>
listObjects(
bucketName: string,
prefix?: string,
recursive?: boolean,
listOpts?: ListObjectsOpts,
): BucketStream<S3ListObject>

listObjectsV2(
bucketName: string,
Expand Down

0 comments on commit 97b9587

Please sign in to comment.