Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
node_version: [22.x, 20.x, 18.x, 16.x ]
node_version: [24.x, 22.x, 20.x, 18.x, 16.x ]
os: [ ubuntu-latest, windows-latest ]

env:
Expand Down
6 changes: 5 additions & 1 deletion src/internal/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ import type { BucketItemWithMetadata, BucketStream } from './type.ts'
import { parseListObjectsV2WithMetadata } from './xml-parser.ts'

export class Extensions {
constructor(private readonly client: TypedClient) {}
private readonly client: TypedClient

constructor(client: TypedClient) {
this.client = client
}

/**
* List the objects in the bucket using S3 ListObjects V2 With Metadata
Expand Down
55 changes: 27 additions & 28 deletions src/internal/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,42 @@ export type ResponseHeader = Record<string, string>
export type ObjectMetaData = Record<string, string | number>

export type RequestHeaders = Record<string, string | boolean | number | undefined>
export type EnabledOrDisabledStatus = 'Enabled' | 'Disabled'

export const ENCRYPTION_TYPES = {
SSEC: 'SSE-C',
KMS: 'KMS',
} as const

export type ENCRYPTION_TYPES = (typeof ENCRYPTION_TYPES)[keyof typeof ENCRYPTION_TYPES]

export type Encryption =
| {
type: ENCRYPTION_TYPES.SSEC
type: typeof ENCRYPTION_TYPES.SSEC
}
| {
type: ENCRYPTION_TYPES.KMS
type: typeof ENCRYPTION_TYPES.KMS
SSEAlgorithm?: string
KMSMasterKeyID?: string
}

export type EnabledOrDisabledStatus = 'Enabled' | 'Disabled'
export enum ENCRYPTION_TYPES {
/**
* SSEC represents server-side-encryption with customer provided keys
*/
SSEC = 'SSE-C',
/**
* KMS represents server-side-encryption with managed keys
*/
KMS = 'KMS',
}

export enum RETENTION_MODES {
GOVERNANCE = 'GOVERNANCE',
COMPLIANCE = 'COMPLIANCE',
}

export enum RETENTION_VALIDITY_UNITS {
DAYS = 'Days',
YEARS = 'Years',
}

export enum LEGAL_HOLD_STATUS {
ENABLED = 'ON',
DISABLED = 'OFF',
}
export const RETENTION_MODES = {
GOVERNANCE: 'GOVERNANCE',
COMPLIANCE: 'COMPLIANCE',
} as const
export type RETENTION_MODES = (typeof RETENTION_MODES)[keyof typeof RETENTION_MODES]

export const RETENTION_VALIDITY_UNITS = {
DAYS: 'Days',
YEARS: 'Years',
} as const
export type RETENTION_VALIDITY_UNITS = (typeof RETENTION_VALIDITY_UNITS)[keyof typeof RETENTION_VALIDITY_UNITS]

export const LEGAL_HOLD_STATUS = {
ENABLED: 'ON',
DISABLED: 'OFF',
} as const
export type LEGAL_HOLD_STATUS = (typeof LEGAL_HOLD_STATUS)[keyof typeof LEGAL_HOLD_STATUS]

export type Transport = Pick<typeof http, 'request'>

Expand Down
Loading