| 1 | import type * as mi from "@distilled.cloud/aws/iot-managed-integrations"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Request for {@link GetSchemaVersion}. |
| 7 | */ |
| 8 | export interface GetSchemaVersionRequest extends mi.GetSchemaVersionRequest {} |
| 9 | |
| 10 | /** |
| 11 | * Runtime binding for `iotmanagedintegrations:GetSchemaVersion` |
| 12 | * (account-level). |
| 13 | * |
| 14 | * Reads one version of a capability or definition schema from the Managed |
| 15 | * integrations schema catalog — the vocabulary that device data models and |
| 16 | * commands are expressed in. Provide the implementation with |
| 17 | * `Effect.provide(AWS.IoTManagedIntegrations.GetSchemaVersionHttp)`. |
| 18 | * |
| 19 | * ### Working with the Schema Catalog |
| 20 | * **Example:** Fetch the On/Off Capability Schema |
| 21 | * ```typescript |
| 22 | * const getSchemaVersion = yield* IoTManagedIntegrations.GetSchemaVersion(); |
| 23 | * |
| 24 | * const { Schema } = yield* getSchemaVersion({ |
| 25 | * Type: "capability", |
| 26 | * SchemaVersionedId: "matter.OnOff@1.4", |
| 27 | * }); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface GetSchemaVersion extends Binding.Service< |
| 33 | GetSchemaVersion, |
| 34 | "AWS.IoTManagedIntegrations.GetSchemaVersion", |
| 35 | () => Effect.Effect< |
| 36 | ( |
| 37 | request: GetSchemaVersionRequest, |
| 38 | ) => Effect.Effect<mi.GetSchemaVersionResponse, mi.GetSchemaVersionError> |
| 39 | > |
| 40 | > {} |
| 41 | export const GetSchemaVersion = Binding.Service<GetSchemaVersion>( |
| 42 | "AWS.IoTManagedIntegrations.GetSchemaVersion", |
| 43 | ); |