@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 49 lines 1.57 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 * `BatchGetDocumentStatus` request with `IndexId` injected from the bound index.
8 */
9 export interface BatchGetDocumentStatusRequest extends Omit<
10 kendra.BatchGetDocumentStatusRequest,
11 "IndexId"
12 > {}
13
14 /**
15 * Runtime binding for the `BatchGetDocumentStatus` operation (IAM action
16 * `kendra:BatchGetDocumentStatus`), scoped to one {@link Index}.
17 *
18 * Returns the indexing status (`INDEXED`, `PROCESSING`, `FAILED`, …) of
19 * documents added with {@link BatchPutDocument} or a data-source sync.
20 * Provide the implementation with
21 * `Effect.provide(AWS.Kendra.BatchGetDocumentStatusHttp)`.
22 *
23 * ### Indexing Documents
24 * **Example:** Check Document Status
25 * ```typescript
26 * const documentStatus = yield* AWS.Kendra.BatchGetDocumentStatus(index);
27 *
28 * const status = yield* documentStatus({
29 * DocumentInfoList: [{ DocumentId: "welcome" }],
30 * });
31 * console.log(status.DocumentStatusList?.[0]?.DocumentStatus);
32 * ```
33 *
34 * @binding
35 */
36 export interface BatchGetDocumentStatus extends Binding.Service<
37 BatchGetDocumentStatus,
38 "AWS.Kendra.BatchGetDocumentStatus",
39 (
40 index: Index,
41 ) => Effect.Effect<
42 (
43 request: BatchGetDocumentStatusRequest,
44 ) => Effect.Effect<kendra.BatchGetDocumentStatusResponse, kendra.BatchGetDocumentStatusError>
45 >
46 > {}
47 export const BatchGetDocumentStatus = Binding.Service<BatchGetDocumentStatus>(
48 "AWS.Kendra.BatchGetDocumentStatus",
49 );