import type { S3Client } from "@aws-sdk/client-s3"; import type { Adapter } from "../index.js"; export interface RailwayAdapterOptions { /** * The bucket's S3 name: its display name plus a short hash (e.g. * `my-bucket-jdhhd8oe18xi`), shown in the bucket's Credentials tab. Falls * back to `AWS_S3_BUCKET_NAME`, the name `railway bucket credentials` prints * it under; required if that env var isn't set. */ bucket?: string; /** * Override the S3 endpoint. Falls back to `AWS_ENDPOINT_URL`, then defaults * to `https://t3.storageapi.dev`, the endpoint Railway's Credentials tab * shows for current buckets. */ endpoint?: string; /** * Static access key ID. Falls back to `AWS_ACCESS_KEY_ID`; required if that * env var isn't set. */ accessKeyId?: string; /** * Static secret access key. Falls back to `AWS_SECRET_ACCESS_KEY`; required * if that env var isn't set. */ secretAccessKey?: string; /** * SigV4 region used for signing. Defaults to `"auto"`, the value Railway * hands out. Buckets are pinned to the region picked at creation, so this * is never used for routing, but the signature requires *some* value. */ region?: string; /** * Use path-style addressing (`//`) rather than virtual-hosted * style. Falls back to `AWS_S3_URL_STYLE` (`"path"` or `"virtual"`), which * Railway hands out alongside the credentials. Current buckets use * virtual-hosted style; some buckets created before Railway switched need * path-style, and their Credentials tab says so. */ forcePathStyle?: boolean; /** * Origin used to build URLs from `url()`. Railway buckets have no public * URLs of their own, so this is for a proxy service or CDN you put in front * of the bucket: `url(key)` returns `${publicBaseUrl}/${key}` and skips * signing. When unset, `url()` returns a presigned GetObject URL (default * expiry: 1 hour). */ publicBaseUrl?: string; /** * Default expiry, in seconds, for the presigned URLs returned by `url()` * when `publicBaseUrl` is not set. Defaults to 3600 (1 hour). */ defaultUrlExpiresIn?: number; } export type RailwayAdapter = Adapter & { readonly bucket: string; }; export declare const railway: (opts?: RailwayAdapterOptions) => RailwayAdapter; //# sourceMappingURL=index.d.ts.map