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