import { Store, SetupFn } from '@walkeros/core'; interface S3StoreSettings { /** S3 bucket name */ bucket: string; /** * S3-compatible endpoint URL (required). * * Examples: * - AWS S3: "https://s3.us-east-1.amazonaws.com" * - Cloudflare R2: "https://.r2.cloudflarestorage.com" * - Scaleway: "https://s3.fr-par.scw.cloud" * - DigitalOcean: "https://nyc3.digitaloceanspaces.com" * - MinIO: "http://localhost:9000" */ endpoint: string; /** S3 access key ID */ accessKeyId: string; /** S3 secret access key */ secretAccessKey: string; /** * AWS region used for SigV4 signing at runtime. Most non-AWS providers * ignore this but SigV4 requires a region string. Use a concrete region * (e.g. `eu-central-1`) or `auto`. * @default "auto" */ region?: string; /** * Key prefix prepended to all store keys. * Use to scope the store to a subdirectory within the bucket. * No leading/trailing slash needed, normalized automatically. * * @example "public/assets" then get("walker.js") looks up "public/assets/walker.js" */ prefix?: string; } type S3StoreInitSettings = S3StoreSettings; /** * Provisioning options for `walkeros setup store.`. Triggered only by the * explicit CLI command. Idempotent, never auto-run. * * The bucket name lives in `Settings.bucket` (not duplicated here) so a single * source of truth governs both setup and runtime get/set/delete. * * Variant B (minimal): only the create-time region is configurable. Encryption, * public-access block, versioning, lifecycle, and tags are not applied by setup * because `s3mini` does not expose them. Configure them via the AWS Console * or `aws s3api` once for now. */ interface S3StoreSetup { /** * Region the bucket is created in. Used as the SigV4 region during * `createBucket` and (for AWS) as the `LocationConstraint`. * * Defaults to `settings.region` when settings.region is concrete (not `auto`), * otherwise `eu-central-1`. Per AGENT.md, EU is the default region for * elbwalker workloads. */ region?: string; } type Types = Store.Types; /** * Default setup options. EU region by default per AGENT.md. */ declare const DEFAULT_SETUP: Required; interface SetupResult { bucketCreated: boolean; } /** * Public alias kept for callers that imported the prior shape. * Equivalent to the framework's `Store.Config`. */ type S3StoreConfig = Store.Config; /** * Provision the S3 bucket described in the flow config. Idempotent. Triggered * only by the explicit `walkeros setup store.` CLI command. * * Variant B: only the bucket is created. Encryption, public-access block, * versioning, lifecycle rules, and tags are not applied here because `s3mini` * does not expose the relevant API operations. Configure those once via the * AWS Console or `aws s3api`. */ declare const setup: SetupFn; declare const storeS3Init: Store.Init; /** * Default export shape for store packages. The CLI (`walkeros setup store.`) * reads `default.setup` to find the lifecycle function; the collector reads * `default.init` (or the named export) to construct the runtime instance. * * Soft breaking change: callers using `import storeS3Init from '@walkeros/server-store-s3'` * (default import) must now call `.init` on the returned object. Named imports * (`import { storeS3Init }`) are unaffected. */ interface StoreS3Module { type: 's3'; init: Store.Init; setup: SetupFn; } declare const storeS3: StoreS3Module; export { DEFAULT_SETUP, type S3StoreConfig, type S3StoreInitSettings, type S3StoreSettings, type S3StoreSetup, type SetupResult, type StoreS3Module, type Types, storeS3 as default, setup, storeS3Init };