@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, 04:45 UTC

main
ts 44 lines 1.24 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 { Processor } from "./Processor.ts";
6
7 export interface GetProcessorRequest extends Omit<
8 documentai.GetProjectsLocationsProcessorsRequest,
9 "name"
10 > {}
11
12 /**
13 * Runtime binding for Document AI `processors.get`.
14 *
15 * Bind this operation to a {@link Processor} in a Function/Action init
16 * phase. Provide {@link GetProcessorHttp}.
17 *
18 * ### Reading a Processor
19 * **Example:** Read the bound processor
20 * ```typescript
21 * const getProcessor = yield* GCP.DocumentAI.GetProcessor(processor);
22 * const live = yield* getProcessor();
23 * ```
24 *
25 * @binding
26 * @category DocumentAI
27 */
28 export interface GetProcessor extends Binding.Service<
29 GetProcessor,
30 "GCP.DocumentAI.GetProcessor",
31 (
32 processor: Processor,
33 ) => Effect.Effect<
34 (
35 request?: GetProcessorRequest,
36 ) => Effect.Effect<
37 documentai.GoogleCloudDocumentaiV1Processor,
38 documentai.GetProjectsLocationsProcessorsError,
39 RuntimeContext
40 >
41 >
42 > {}
43
44 export const GetProcessor = Binding.Service<GetProcessor>("GCP.DocumentAI.GetProcessor");