import { type ResultFailure } from "../../runtime/result.js"; import { type Run } from "../../runtime/asyncContext.js"; export type GetTextOperation = { readonly kind: "getText"; readonly bucket: string; readonly key: string; }; export type GetBinaryOperation = { readonly kind: "getBinary"; readonly bucket: string; readonly key: string; }; export type PutTextOperation = { readonly kind: "putText"; readonly bucket: string; readonly key: string; readonly content: string; readonly contentType: string; }; export type PutBinaryOperation = { readonly kind: "putBinary"; readonly bucket: string; readonly key: string; readonly base64: string; readonly contentType: string; }; export type CreateBucketOperation = { readonly kind: "createBucket"; readonly bucket: string; }; export type PresignGetOperation = { readonly kind: "presignGet"; readonly bucket: string; readonly key: string; readonly expiresIn: number; }; export type S3Operation = GetTextOperation | GetBinaryOperation | PutTextOperation | PutBinaryOperation | CreateBucketOperation | PresignGetOperation; export type S3PutResult = { readonly bucket: string; readonly key: string; readonly url: string; readonly etag: string; }; export type S3CreateBucketResult = { readonly bucket: string; readonly region: string; readonly location: string; }; export type S3OperationResult = string | S3PutResult | S3CreateBucketResult | ResultFailure; /** * The one place that owns the full imperative pipeline for every S3 operation: * validation, credential/partition/bucket resolution, key checks, target * construction, codecs, the upload cap, transport, non-2xx mapping, binary * redaction, and result shaping. The extern helpers below are one-call adapters. */ export declare function runS3Operation(run: Run, region: string, operation: S3Operation): Promise; export declare function _s3Get(bucket: string, key: string, region: string): Promise; export declare function _s3GetBinary(bucket: string, key: string, region: string): Promise; export declare function _s3Put(bucket: string, key: string, content: string, region: string, contentType: string): Promise; export declare function _s3PutBinary(bucket: string, key: string, base64: string, region: string, contentType: string): Promise; export declare function _s3PresignGet(bucket: string, key: string, expiresIn: number, region: string): Promise; export declare function _createBucket(bucket: string, region: string): Promise;