The best way to control Claude Code, Codex and more from any computer or phone

main
ts 41 lines 1.52 KB
Raw
1 import type * as schemas from "@distilled.cloud/aws/schemas";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Schema } from "./Schema.ts";
5
6 /**
7 * Runtime binding for `schemas:ListSchemaVersions`.
8 *
9 * Lists the published versions of the bound {@link Schema} so a function can
10 * enumerate the history of an event contract (e.g. to detect that a new
11 * version was published, or to pin consumers to a version range). The
12 * registry and schema names are injected from the binding. Provide the
13 * implementation with `Effect.provide(AWS.Schemas.ListSchemaVersionsHttp)`.
14 * ### Reading Schemas
15 * **Example:** List All Versions
16 * ```typescript
17 * // init — bind the operation to the schema
18 * const listSchemaVersions = yield* AWS.Schemas.ListSchemaVersions(schema);
19 *
20 * // runtime
21 * const { SchemaVersions } = yield* listSchemaVersions();
22 * const versions = (SchemaVersions ?? []).map((v) => v.SchemaVersion);
23 * ```
24 *
25 * @binding
26 */
27 export interface ListSchemaVersions extends Binding.Service<
28 ListSchemaVersions,
29 "AWS.Schemas.ListSchemaVersions",
30 (schema: Schema) => Effect.Effect<
31 (request?: {
32 /** The maximum number of versions to return per page. */
33 Limit?: number;
34 /** The pagination token from a previous response. */
35 NextToken?: string;
36 }) => Effect.Effect<schemas.ListSchemaVersionsResponse, schemas.ListSchemaVersionsError>
37 >
38 > {}
39 export const ListSchemaVersions = Binding.Service<ListSchemaVersions>(
40 "AWS.Schemas.ListSchemaVersions",
41 );