import { S3Client } from "@aws-sdk/client-s3"; //#region src/server-helpers/types/internal.d.ts type HelperBaseParams = { /** * The S3 client. */ client: S3Client; /** * The name of the bucket where the file is stored. */ bucketName: string; }; type CreateCloudflareClientParams = { /** * Cloudflare account ID. */ accountId: string; /** * Cloudflare R2 access key ID. */ accessKeyId: string; /** * Cloudflare R2 secret access key. */ secretAccessKey: string; /** * The jurisdiction where the data is stored. * * Only use this if you created your R2 bucket using a jurisdiction. */ jurisdiction?: 'eu' | 'fedramp'; }; type CreateMinioClientParams = { /** * Minio region. */ region: string; /** * Minio access key ID. */ accessKeyId: string; /** * Minio secret access key. */ secretAccessKey: string; /** * Minio endpoint. */ endpoint: string; }; type CreateBackblazeClientParams = { /** * Backblaze B2 region. */ region: string; /** * Backblaze B2 application key ID. */ applicationKeyId: string; /** * Backblaze B2 application key. */ applicationKey: string; }; type CreateWasabiClientParams = { /** * Wasabi region. */ region: string; /** * Wasabi access key ID. */ accessKeyId: string; /** * Wasabi secret access key. */ secretAccessKey: string; }; type CreateDigitalOceanClientParams = { /** * DigitalOcean Spaces region. */ region: string; /** * DigitalOcean Spaces key. */ key: string; /** * DigitalOcean Spaces secret. */ secret: string; }; type CreateTigrisClientParams = { /** * Tigris access key ID. */ accessKeyId: string; /** * Tigris secret access key. */ secretAccessKey: string; /** * Tigris endpoint. * * @default `https://t3.storage.dev` */ endpoint?: string; }; //#endregion //#region src/server-helpers/objects/move-object.d.ts /** * Move an object from one location to another inside an S3 bucket. * * **WARNING:** This copies the object to the new location and then deletes the original object. It can be slow. */ declare function moveObject({ client, bucketName, objectKey, destinationKey }: HelperBaseParams & { /** * The key of the object to move. Do not include the bucket name. * * @example 'example.jpg' */ objectKey: string; /** * The key of where the object will be moved to. Do not include the bucket name. * * @example 'images/example.jpg' */ destinationKey: string; }): Promise; //#endregion //#region src/server-helpers/clients/backblaze.d.ts /** * Create a Backblaze B2 client, compatible with the S3 API. * * Optionally, you can omit the parameters and use the following environment variables: * - `B2_REGION` * - `B2_APP_KEY_ID` * - `B2_APP_KEY` */ declare function backblaze(params?: CreateBackblazeClientParams): S3Client; //#endregion //#region src/server-helpers/clients/cloudflare.d.ts /** * Create a Cloudflare R2 client, compatible with the S3 API. * * Optionally, you can omit the parameters and use the following environment variables: * - `CLOUDFLARE_ACCOUNT_ID` * - `AWS_ACCESS_KEY_ID` * - `AWS_SECRET_ACCESS_KEY` * - `CLOUDFLARE_JURISDICTION` */ declare function cloudflare(params?: CreateCloudflareClientParams): S3Client; //#endregion //#region src/server-helpers/clients/digital-ocean.d.ts /** * Create a DigitalOcean Spaces client, compatible with the S3 API. * * Optionally, you can omit the parameters and use the following environment variables: * - `SPACES_REGION` * - `SPACES_KEY` * - `SPACES_SECRET` */ declare function digitalOcean(params?: CreateDigitalOceanClientParams): S3Client; //#endregion //#region src/server-helpers/clients/minio.d.ts /** * Create a Minio client, compatible with the S3 API. * * Optionally, you can omit the parameters and use the following environment variables: * - `AWS_REGION` * - `AWS_ACCESS_KEY_ID` * - `AWS_SECRET_ACCESS_KEY` * - `MINIO_ENDPOINT` */ declare function minio(params?: CreateMinioClientParams): S3Client; //#endregion //#region src/server-helpers/clients/tigris.d.ts /** * Create a Tigris client, compatible with the S3 API. * * Optionally, you can omit the parameters and use the following environment variables: * - `AWS_ACCESS_KEY_ID` * - `AWS_SECRET_ACCESS_KEY` * - `TIGRIS_ENDPOINT` */ declare function tigris(params?: CreateTigrisClientParams): S3Client; //#endregion //#region src/server-helpers/clients/wasabi.d.ts /** * Create a Wasabi client, compatible with the S3 API. * * Optionally, you can omit the parameters and use the following environment variables: * - `WASABI_REGION` * - `AWS_ACCESS_KEY_ID` * - `AWS_SECRET_ACCESS_KEY` */ declare function wasabi(params?: CreateWasabiClientParams): S3Client; //#endregion export { backblaze, cloudflare, digitalOcean, minio, moveObject, tigris, wasabi };