/**
* A Prisma bucket's S3-compatible API with the credentials this SDK already
* holds. `@distilled.cloud/prisma/management` re-exports it.
*
* Prisma's S3 keys are bucket keys, and a bucket key's secret is returned
* only when the key is created. So `layerS3` creates a bucket key with the
* Prisma `Credentials` when the layer is built, provides
* `@distilled.cloud/s3`'s `Credentials` (region `auto`) and `Endpoint` from
* it, and deletes the key when the layer's scope closes. The bucket's S3
* name, which differs from its id, is the `S3BucketName` service.
*
* @example
* ```ts
* import * as S3 from "@distilled.cloud/s3";
* import * as Management from "@distilled.cloud/prisma/management";
*
* const keys = Effect.gen(function* () {
* const Bucket = yield* Management.S3BucketName;
* return yield* S3.listObjectsV2({ Bucket });
* }).pipe(Effect.provide(Management.layerS3({ bucketId })));
* ```
*/
import type * as S3Credentials from "@distilled.cloud/s3/Credentials";
import type * as S3Endpoint from "@distilled.cloud/s3/Endpoint";
import * as Context from "effect/Context";
import type * as HttpClient from "effect/http/HttpClient";
import * as Layer from "effect/Layer";
import type { Credentials } from "./credentials.ts";
declare const S3CredentialsError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "PrismaS3CredentialsError";
} & Readonly;
/** The bucket key for the S3 API could not be created. */
export declare class S3CredentialsError extends /*@__PURE__*/ S3CredentialsError_base<{
message: string;
cause?: unknown;
}> {
}
declare const S3BucketName_base: Context.ServiceClass;
/** The bucket's name on the S3 API (the `Bucket` of every S3 call). */
export declare class S3BucketName extends /*@__PURE__*/ S3BucketName_base {
}
export interface LayerS3Options {
readonly bucketId: string;
/** The access the bucket key grants. Default: `"read_write"`. */
readonly role?: "read" | "read_write";
}
/**
* `@distilled.cloud/s3`'s `Credentials` and `Endpoint`, and the bucket's
* `S3BucketName`, from a bucket key this layer creates and deletes.
*/
export declare const layerS3: (options: LayerS3Options) => Layer.Layer;
export {};
//# sourceMappingURL=layer-s3.d.ts.map