1import type * as cw from "@distilled.cloud/gcp/contentwarehouse_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { DocumentSchema } from "./DocumentSchema.ts";
6
7export interface GetDocumentSchemaRequest extends Omit<
8 cw.GetProjectsLocationsDocumentSchemasRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Document AI Warehouse `documentSchemas.get`.
14 *
15 * Bind this operation to a {@link DocumentSchema} in a Function/Action
16 * init phase. Provide {@link GetDocumentSchemaHttp}.
17 *
18 * ### Reading Schemas
19 * **Example:** Read the bound schema
20 * ```typescript
21 * const getSchema = yield* GCP.ContentWarehouse.GetDocumentSchema(schema);
22 * const live = yield* getSchema();
23 * ```
24 *
25 * @binding
26 * @category ContentWarehouse
27 */
28export interface GetDocumentSchema extends Binding.Service<
29 GetDocumentSchema,
30 "GCP.ContentWarehouse.GetDocumentSchema",
31 (
32 schema: DocumentSchema,
33 ) => Effect.Effect<
34 (
35 request?: GetDocumentSchemaRequest,
36 ) => Effect.Effect<
37 cw.GoogleCloudContentwarehouseV1DocumentSchema,
38 cw.GetProjectsLocationsDocumentSchemasError,
39 RuntimeContext
40 >
41 >
42> {}
43
44export const GetDocumentSchema = Binding.Service<GetDocumentSchema>(
45 "GCP.ContentWarehouse.GetDocumentSchema",
46);