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

main
ts 42 lines 1.21 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 { Subscription } from "./Subscription.ts";
6
7 export interface AcknowledgeRequest extends Omit<
8 pubsub.AcknowledgeProjectsSubscriptionsRequest,
9 "subscription"
10 > {}
11
12 /**
13 * Runtime binding for Pub/Sub `subscriptions.acknowledge`.
14 *
15 * Bind this operation to a {@link Subscription} in a Function/Action init
16 * phase. Provide {@link AcknowledgeHttp}.
17 *
18 * ### Acknowledging Messages
19 * **Example:** Acknowledge pulled messages
20 * ```typescript
21 * const acknowledge = yield* GCP.PubSub.Acknowledge(subscription);
22 * yield* acknowledge({
23 * body: { ackIds: [ackId] },
24 * });
25 * ```
26 *
27 * @binding
28 * @category PubSub
29 */
30 export interface Acknowledge extends Binding.Service<
31 Acknowledge,
32 "GCP.PubSub.Acknowledge",
33 (
34 subscription: Subscription,
35 ) => Effect.Effect<
36 (
37 request: AcknowledgeRequest,
38 ) => Effect.Effect<pubsub.Empty, pubsub.AcknowledgeProjectsSubscriptionsError, RuntimeContext>
39 >
40 > {}
41
42 export const Acknowledge = Binding.Service<Acknowledge>("GCP.PubSub.Acknowledge");