import type * as s3vectors from "@distilled.cloud/aws/s3vectors"; import type * as Effect from "effect/Effect"; import * as Binding from "../../Binding.ts"; import type { Index } from "./VectorIndex.ts"; /** Fields the binding injects from the bound {@link Index}. */ type IndexRef = "vectorBucketName" | "indexName" | "indexArn"; export interface PutVectorsRequest extends Omit { } export interface DeleteVectorsRequest extends Omit { } /** * The write-only runtime client returned by binding an {@link Index} via * {@link VectorsWrite}. All calls target the bound index (its ARN is * injected); pass raw distilled request shapes minus the index identifier. */ export interface WriteVectorsClient { /** Insert or overwrite vectors (keyed by `key`). */ readonly put: (request: PutVectorsRequest) => Effect.Effect; /** Delete vectors by key. */ readonly delete: (request: DeleteVectorsRequest) => Effect.Effect; } /** * Write-only runtime binding for the S3 Vectors data plane — insert and * delete vectors in a bound {@link Index}. * * Grants only `s3vectors:PutVectors` and `s3vectors:DeleteVectors` on * exactly the bound index's ARN — the least-privilege choice for ingestion * pipelines that write embeddings but never query them. Provide the * implementation with `Effect.provide(AWS.S3Vectors.VectorsWriteHttp)`. * * ### Writing Vectors * **Example:** Insert Embeddings (write-only) * ```typescript * // init * const vectors = yield* AWS.S3Vectors.VectorsWrite(index); * * // runtime * yield* vectors.put({ * vectors: [{ key: "doc-1", data: { float32: [0.1, 0.2, 0.3] } }], * }); * ``` * * @binding */ export interface VectorsWrite extends Binding.Service(index: I) => Effect.Effect> { } export declare const VectorsWrite: VectorsWrite; export {}; //# sourceMappingURL=VectorsWrite.d.ts.map