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

main
ts 51 lines 1.49 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 ComputeHeadCursorRequest extends Omit<
8 pubsublite.ComputeHeadCursorTopicStatsProjectsLocationsTopicsRequest,
9 "topic"
10 > {}
11
12 /**
13 * Runtime binding for Pub/Sub Lite `topicStats.computeHeadCursor`.
14 *
15 * Bind this operation to an {@link AdminTopic} in a Function/Action init
16 * phase. Provide {@link ComputeHeadCursorHttp}.
17 *
18 * Grants `roles/pubsublite.subscriber` on the project: Pub/Sub Lite has no
19 * resource-level IAM.
20 *
21 * ### Computing the Head Cursor
22 * **Example:** Head cursor of partition 0
23 * ```typescript
24 * const computeHead = yield* GCP.PubSubLite.ComputeHeadCursor(events);
25 * const { headCursor } = yield* computeHead({
26 * body: { partition: "0" },
27 * });
28 * ```
29 *
30 * @binding
31 * @category PubSubLite
32 */
33 export interface ComputeHeadCursor extends Binding.Service<
34 ComputeHeadCursor,
35 "GCP.PubSubLite.ComputeHeadCursor",
36 (
37 topic: AdminTopic,
38 ) => Effect.Effect<
39 (
40 request?: ComputeHeadCursorRequest,
41 ) => Effect.Effect<
42 pubsublite.ComputeHeadCursorResponse,
43 pubsublite.ComputeHeadCursorTopicStatsProjectsLocationsTopicsError,
44 RuntimeContext
45 >
46 >
47 > {}
48
49 export const ComputeHeadCursor = Binding.Service<ComputeHeadCursor>(
50 "GCP.PubSubLite.ComputeHeadCursor",
51 );