| 1 | import type * as documentai from "@distilled.cloud/gcp/documentai_v1"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { SchemasSchemaVersion } from "./SchemasSchemaVersion.ts"; |
| 6 | |
| 7 | export interface GetSchemaVersionRequest extends Omit< |
| 8 | documentai.GetProjectsLocationsSchemasSchemaVersionsRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Document AI `schemaVersions.get`. |
| 14 | * |
| 15 | * Bind this operation to a {@link SchemasSchemaVersion} in a |
| 16 | * Function/Action init phase. Provide {@link GetSchemaVersionHttp}. |
| 17 | * |
| 18 | * ### Reading a Schema Version |
| 19 | * **Example:** Read the bound schema version |
| 20 | * ```typescript |
| 21 | * const getVersion = yield* GCP.DocumentAI.GetSchemaVersion(version); |
| 22 | * const live = yield* getVersion(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | * @category DocumentAI |
| 27 | */ |
| 28 | export interface GetSchemaVersion extends Binding.Service< |
| 29 | GetSchemaVersion, |
| 30 | "GCP.DocumentAI.GetSchemaVersion", |
| 31 | ( |
| 32 | version: SchemasSchemaVersion, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: GetSchemaVersionRequest, |
| 36 | ) => Effect.Effect< |
| 37 | documentai.GoogleCloudDocumentaiV1SchemaVersion, |
| 38 | documentai.GetProjectsLocationsSchemasSchemaVersionsError, |
| 39 | RuntimeContext |
| 40 | > |
| 41 | > |
| 42 | > {} |
| 43 | |
| 44 | export const GetSchemaVersion = Binding.Service<GetSchemaVersion>( |
| 45 | "GCP.DocumentAI.GetSchemaVersion", |
| 46 | ); |