import type { ObjectStorageProvider } from '@stacksjs/ts-cloud'; /** * Make sure `bucket` exists, creating it if it does not. * * Idempotent: an existing bucket is reported rather than treated as an error, * so this is safe to call on every deploy and on every boot. */ export declare function ensureBucket(bucket: string, options?: ProvisionOptions): Promise; /** * Ensure every bucket the app's filesystem config names. * * Reads `filesystems.s3.bucket` plus any bucket named by a configured disk, so * a deploy provisions what the app is actually configured to use rather than a * list maintained separately. */ export declare function ensureConfiguredBuckets(options?: ProvisionOptions): Promise; /** * Bucket provisioning. * * An app that writes to object storage should not fail on its first upload * because nobody created the bucket by hand, and it should not require a * separate infrastructure step for something the app already knows the name of. * Vapor provisions the bucket as part of deploying; this is the same idea, * available both as an explicit call and as an on-demand check before a write. * * Creation is deliberately *not* implicit on every write. `ensureBucket` is * cheap but not free, and silently creating buckets from a typo'd config name * is how an account ends up with a dozen near-identical buckets and data * spread across them. Apps opt in via `filesystems.autoCreateBuckets`. */ export declare interface ProvisionOptions { provider?: ObjectStorageProvider region?: string endpoint?: string credentials?: { accessKeyId: string, secretAccessKey: string } acl?: string } export declare interface ProvisionResult { bucket: string status: 'created' | 'exists' provider: ObjectStorageProvider region: string endpoint?: string publicUrl: string }