Skip to content

Commit

Permalink
Type Credentials.ts (minio#1106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent FAYOLLE committed Jul 15, 2023
1 parent a125e9c commit c4de2b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/Credentials.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { ICredentials } from './internal/type'

export class Credentials {
public accessKey: string
public secretKey: string
public sessionToken?: string

constructor({ accessKey, secretKey, sessionToken }: { accessKey: string; secretKey: string; sessionToken?: string }) {
constructor({ accessKey, secretKey, sessionToken }: ICredentials) {
this.accessKey = accessKey
this.secretKey = secretKey
this.sessionToken = sessionToken
Expand Down
7 changes: 2 additions & 5 deletions src/minio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import type {
IncompleteUploadedBucketItem,
ItemBucketMetadata,
ItemBucketMetadataList,
UploadedObjectInfo,
} from './internal/type.ts'

export * from './helpers.ts'
Expand All @@ -42,6 +43,7 @@ export type {
ItemBucketMetadataList,
NoResultCallback,
RemoveOptions,
UploadedObjectInfo,
}

// Exports only from typings
Expand Down Expand Up @@ -108,11 +110,6 @@ export interface MetadataItem {
Value: string
}

export interface UploadedObjectInfo {
etag: string
versionId: string | null
}

export interface Tag {
Key: string
Value: string
Expand Down

0 comments on commit c4de2b2

Please sign in to comment.