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

main
ts 46 lines 1.45 KB
Raw
1 import type * as qbusiness from "@distilled.cloud/aws/qbusiness";
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 * `GetDocumentContent` request with `applicationId` + `indexId` injected from the bound index.
8 */
9 export interface GetDocumentContentRequest extends Omit<
10 qbusiness.GetDocumentContentRequest,
11 "applicationId" | "indexId"
12 > {}
13
14 /**
15 * Runtime binding for the `GetDocumentContent` operation (IAM action
16 * `qbusiness:GetDocumentContent`), scoped to one {@link Index}.
17 *
18 * Returns a presigned URL for an indexed document's content, in the
19 * raw uploaded format or the extracted text.
20 * Provide the implementation with
21 * `Effect.provide(AWS.QBusiness.GetDocumentContentHttp)`.
22 *
23 * ### Document Ingestion
24 * **Example:** Fetch a Document's Content
25 * ```typescript
26 * const getContent = yield* AWS.QBusiness.GetDocumentContent(index);
27 *
28 * const { presignedUrl } = yield* getContent({ documentId: "welcome" });
29 * ```
30 *
31 * @binding
32 */
33 export interface GetDocumentContent extends Binding.Service<
34 GetDocumentContent,
35 "AWS.QBusiness.GetDocumentContent",
36 (
37 index: Index,
38 ) => Effect.Effect<
39 (
40 request: GetDocumentContentRequest,
41 ) => Effect.Effect<qbusiness.GetDocumentContentResponse, qbusiness.GetDocumentContentError>
42 >
43 > {}
44 export const GetDocumentContent = Binding.Service<GetDocumentContent>(
45 "AWS.QBusiness.GetDocumentContent",
46 );