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

main
ts 47 lines 1.38 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 GetPartitionsRequest extends Omit<
8 pubsublite.GetPartitionsAdminProjectsLocationsTopicsRequest,
9 "name"
10 > {}
11
12 /**
13 * Runtime binding for Pub/Sub Lite `topics.getPartitions`.
14 *
15 * Bind this operation to an {@link AdminTopic} in a Function/Action init
16 * phase. Provide {@link GetPartitionsHttp}.
17 *
18 * Grants `roles/pubsublite.viewer` on the project: Pub/Sub Lite has no
19 * resource-level IAM.
20 *
21 * ### Reading Partition Count
22 * **Example:** Get the live partition count
23 * ```typescript
24 * const getPartitions = yield* GCP.PubSubLite.GetPartitions(events);
25 * const { partitionCount } = yield* getPartitions();
26 * ```
27 *
28 * @binding
29 * @category PubSubLite
30 */
31 export interface GetPartitions extends Binding.Service<
32 GetPartitions,
33 "GCP.PubSubLite.GetPartitions",
34 (
35 topic: AdminTopic,
36 ) => Effect.Effect<
37 (
38 request?: GetPartitionsRequest,
39 ) => Effect.Effect<
40 pubsublite.TopicPartitions,
41 pubsublite.GetPartitionsAdminProjectsLocationsTopicsError,
42 RuntimeContext
43 >
44 >
45 > {}
46
47 export const GetPartitions = Binding.Service<GetPartitions>("GCP.PubSubLite.GetPartitions");