@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 49 lines 1.45 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 { AdminSubscription } from "./AdminSubscription.ts";
6
7 export interface CommitCursorRequest extends Omit<
8 pubsublite.CommitCursorCursorProjectsLocationsSubscriptionsRequest,
9 "subscription"
10 > {}
11
12 /**
13 * Runtime binding for Pub/Sub Lite `cursor.commitCursor`.
14 *
15 * Bind this operation to an {@link AdminSubscription} in a Function/Action
16 * init phase. Provide {@link CommitCursorHttp}.
17 *
18 * Grants `roles/pubsublite.subscriber` on the project: Pub/Sub Lite has no
19 * resource-level IAM.
20 *
21 * ### Committing a Cursor
22 * **Example:** Commit partition 0 to offset 10
23 * ```typescript
24 * const commit = yield* GCP.PubSubLite.CommitCursor(inbox);
25 * yield* commit({
26 * body: { partition: "0", cursor: { offset: "10" } },
27 * });
28 * ```
29 *
30 * @binding
31 * @category PubSubLite
32 */
33 export interface CommitCursor extends Binding.Service<
34 CommitCursor,
35 "GCP.PubSubLite.CommitCursor",
36 (
37 subscription: AdminSubscription,
38 ) => Effect.Effect<
39 (
40 request?: CommitCursorRequest,
41 ) => Effect.Effect<
42 pubsublite.CommitCursorResponse,
43 pubsublite.CommitCursorCursorProjectsLocationsSubscriptionsError,
44 RuntimeContext
45 >
46 >
47 > {}
48
49 export const CommitCursor = Binding.Service<CommitCursor>("GCP.PubSubLite.CommitCursor");