@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 37 lines 1.09 KB
Raw
1 import type * as pubsub from "@distilled.cloud/gcp/pubsub_v1";
2 import * as Binding from "alchemy/Binding";
3 import type { RuntimeContext } from "alchemy/RuntimeContext";
4 import type * as Effect from "effect/Effect";
5 import type { Schema } from "./Schema.ts";
6
7 export interface GetSchemaRequest extends Omit<pubsub.GetProjectsSchemasRequest, "name"> {}
8
9 /**
10 * Runtime binding for Pub/Sub `schemas.get`.
11 *
12 * Bind this operation to a {@link Schema} in a Function/Action init phase.
13 * Provide {@link GetSchemaHttp}.
14 *
15 * ### Reading a Schema
16 * **Example:** Get the latest revision
17 * ```typescript
18 * const getSchema = yield* GCP.PubSub.GetSchema(schema);
19 * const live = yield* getSchema({ view: "FULL" });
20 * ```
21 *
22 * @binding
23 * @category PubSub
24 */
25 export interface GetSchema extends Binding.Service<
26 GetSchema,
27 "GCP.PubSub.GetSchema",
28 (
29 schema: Schema,
30 ) => Effect.Effect<
31 (
32 request?: GetSchemaRequest,
33 ) => Effect.Effect<pubsub.Pubsub_Schema, pubsub.GetProjectsSchemasError, RuntimeContext>
34 >
35 > {}
36
37 export const GetSchema = Binding.Service<GetSchema>("GCP.PubSub.GetSchema");