@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, 04:45 UTC

main
ts 43 lines 1.21 KB
Raw
1 import type {
2 GetWebhookEndpointError,
3 GetWebhookEndpointRequest,
4 WebhookEndpoint as StripeWebhookEndpoint,
5 } from "@distilled.cloud/stripe/stripe";
6 import * as Binding from "alchemy/Binding";
7 import type { RuntimeContext } from "alchemy/RuntimeContext";
8 import type * as Effect from "effect/Effect";
9 import type { WebhookEndpoint } from "./WebhookEndpoint.ts";
10
11 export interface RetrieveWebhookEndpointRequest extends Omit<
12 GetWebhookEndpointRequest,
13 "webhook_endpoint"
14 > {}
15
16 /**
17 * Retrieve a bound Stripe Webhook Endpoint over HTTP.
18 *
19 * ### Reading a Webhook Endpoint
20 * **Example:** Bind and retrieve
21 * ```typescript
22 * const retrieve = yield* Stripe.RetrieveWebhookEndpoint(hook);
23 * const live = yield* retrieve();
24 * ```
25 *
26 * @binding
27 * @product Webhook
28 */
29 export interface RetrieveWebhookEndpoint extends Binding.Service<
30 RetrieveWebhookEndpoint,
31 "Stripe.RetrieveWebhookEndpoint",
32 (
33 webhookEndpoint: WebhookEndpoint,
34 ) => Effect.Effect<
35 (
36 request?: RetrieveWebhookEndpointRequest,
37 ) => Effect.Effect<StripeWebhookEndpoint, GetWebhookEndpointError, RuntimeContext>
38 >
39 > {}
40
41 export const RetrieveWebhookEndpoint = Binding.Service<RetrieveWebhookEndpoint>(
42 "Stripe.RetrieveWebhookEndpoint",
43 );