1import type * as documentai from "@distilled.cloud/gcp/documentai_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { Processor } from "./Processor.ts";
6
7export 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 */
28export 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
44export const GetProcessor = Binding.Service<GetProcessor>(
45 "GCP.DocumentAI.GetProcessor",
46);