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

main
ts 47 lines 1.25 KB
Raw
1 import type * as pubsublite from "@distilled.cloud/gcp/pubsublite_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 { AdminTopic } from "./AdminTopic.ts";
6
7 export interface GetTopicRequest extends Omit<
8 pubsublite.GetAdminProjectsLocationsTopicsRequest,
9 "name"
10 > {}
11
12 /**
13 * Runtime binding for Pub/Sub Lite `topics.get`.
14 *
15 * Bind this operation to an {@link AdminTopic} in a Function/Action init
16 * phase. Provide {@link GetTopicHttp}.
17 *
18 * Grants `roles/pubsublite.viewer` on the project: Pub/Sub Lite has no
19 * resource-level IAM.
20 *
21 * ### Observing Topics
22 * **Example:** Read the bound topic
23 * ```typescript
24 * const getTopic = yield* GCP.PubSubLite.GetTopic(events);
25 * const live = yield* getTopic();
26 * ```
27 *
28 * @binding
29 * @category PubSubLite
30 */
31 export interface GetTopic extends Binding.Service<
32 GetTopic,
33 "GCP.PubSubLite.GetTopic",
34 (
35 topic: AdminTopic,
36 ) => Effect.Effect<
37 (
38 request?: GetTopicRequest,
39 ) => Effect.Effect<
40 pubsublite.Topic,
41 pubsublite.GetAdminProjectsLocationsTopicsError,
42 RuntimeContext
43 >
44 >
45 > {}
46
47 export const GetTopic = Binding.Service<GetTopic>("GCP.PubSubLite.GetTopic");