| 1 | import type * as qbusiness from "@distilled.cloud/aws/qbusiness"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Index } from "./SearchIndex.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `BatchDeleteDocument` request with `applicationId` + `indexId` injected from the bound index. |
| 8 | */ |
| 9 | export interface BatchDeleteDocumentRequest extends Omit< |
| 10 | qbusiness.BatchDeleteDocumentRequest, |
| 11 | "applicationId" | "indexId" |
| 12 | > {} |
| 13 | |
| 14 | /** |
| 15 | * Runtime binding for the `BatchDeleteDocument` operation (IAM action |
| 16 | * `qbusiness:BatchDeleteDocument`), scoped to one {@link Index}. |
| 17 | * |
| 18 | * Removes documents from the index by document id. |
| 19 | * Provide the implementation with |
| 20 | * `Effect.provide(AWS.QBusiness.BatchDeleteDocumentHttp)`. |
| 21 | * |
| 22 | * ### Document Ingestion |
| 23 | * **Example:** Delete Documents from an Index |
| 24 | * ```typescript |
| 25 | * const deleteDocuments = yield* AWS.QBusiness.BatchDeleteDocument(index); |
| 26 | * |
| 27 | * yield* deleteDocuments({ documents: [{ documentId: "welcome" }] }); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface BatchDeleteDocument extends Binding.Service< |
| 33 | BatchDeleteDocument, |
| 34 | "AWS.QBusiness.BatchDeleteDocument", |
| 35 | ( |
| 36 | index: Index, |
| 37 | ) => Effect.Effect< |
| 38 | ( |
| 39 | request: BatchDeleteDocumentRequest, |
| 40 | ) => Effect.Effect< |
| 41 | qbusiness.BatchDeleteDocumentResponse, |
| 42 | qbusiness.BatchDeleteDocumentError |
| 43 | > |
| 44 | > |
| 45 | > {} |
| 46 | export const BatchDeleteDocument = Binding.Service<BatchDeleteDocument>( |
| 47 | "AWS.QBusiness.BatchDeleteDocument", |
| 48 | ); |