@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 44 lines 1.17 KB
Raw
1 import type * as documentai from "@distilled.cloud/gcp/documentai_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 { Schema } from "./Schema.ts";
6
7 export interface GetSchemaRequest extends Omit<
8 documentai.GetProjectsLocationsSchemasRequest,
9 "name"
10 > {}
11
12 /**
13 * Runtime binding for Document AI `schemas.get`.
14 *
15 * Bind this operation to a {@link Schema} in a Function/Action init
16 * phase. Provide {@link GetSchemaHttp}.
17 *
18 * ### Reading a Schema
19 * **Example:** Read the bound schema
20 * ```typescript
21 * const getSchema = yield* GCP.DocumentAI.GetSchema(schema);
22 * const live = yield* getSchema();
23 * ```
24 *
25 * @binding
26 * @category DocumentAI
27 */
28 export interface GetSchema extends Binding.Service<
29 GetSchema,
30 "GCP.DocumentAI.GetSchema",
31 (
32 schema: Schema,
33 ) => Effect.Effect<
34 (
35 request?: GetSchemaRequest,
36 ) => Effect.Effect<
37 documentai.GoogleCloudDocumentaiV1NextSchema,
38 documentai.GetProjectsLocationsSchemasError,
39 RuntimeContext
40 >
41 >
42 > {}
43
44 export const GetSchema = Binding.Service<GetSchema>("GCP.DocumentAI.GetSchema");