The best way to control Claude Code, Codex and more from any computer or phone

main
ts 46 lines 1.38 KB
Raw
1 import type * as kendra from "@distilled.cloud/aws/kendra";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Index } from "./SearchIndex.ts";
5
6 /**
7 * `BatchDeleteDocument` request with `IndexId` injected from the bound index.
8 */
9 export 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 */
33 export 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<kendra.BatchDeleteDocumentResponse, kendra.BatchDeleteDocumentError>
42 >
43 > {}
44 export const BatchDeleteDocument = Binding.Service<BatchDeleteDocument>(
45 "AWS.Kendra.BatchDeleteDocument",
46 );