The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as cw from "@distilled.cloud/gcp/contentwarehouse_v1"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type { RuntimeContext } from "alchemy/RuntimeContext"; |
| 4 | import type * as Effect from "effect/Effect"; |
| 5 | import type { Document } from "./Document.ts"; |
| 6 | |
| 7 | export interface GetDocumentRequest extends Omit<cw.GetProjectsLocationsDocumentsRequest, "name"> {} |
| 8 | |
| 9 | /** |
| 10 | * Runtime binding for Document AI Warehouse `documents.get`. |
| 11 | * |
| 12 | * Bind this operation to a {@link Document} in a Function/Action init |
| 13 | * phase. Provide {@link GetDocumentHttp}. |
| 14 | * |
| 15 | * ### Reading Documents |
| 16 | * **Example:** Read the bound document |
| 17 | * ```typescript |
| 18 | * const getDocument = yield* GCP.ContentWarehouse.GetDocument(document); |
| 19 | * const live = yield* getDocument(); |
| 20 | * ``` |
| 21 | * |
| 22 | * @binding |
| 23 | * @category ContentWarehouse |
| 24 | */ |
| 25 | export interface GetDocument extends Binding.Service< |
| 26 | GetDocument, |
| 27 | "GCP.ContentWarehouse.GetDocument", |
| 28 | ( |
| 29 | document: Document, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request?: GetDocumentRequest, |
| 33 | ) => Effect.Effect< |
| 34 | cw.GoogleCloudContentwarehouseV1Document, |
| 35 | cw.GetProjectsLocationsDocumentsError, |
| 36 | RuntimeContext |
| 37 | > |
| 38 | > |
| 39 | > {} |
| 40 | |
| 41 | export const GetDocument = Binding.Service<GetDocument>("GCP.ContentWarehouse.GetDocument"); |