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

main
ts 36 lines 1012 Bytes
Raw
1 import type {
2 Coupon as StripeCoupon,
3 GetCouponError,
4 GetCouponRequest,
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 { Coupon } from "./Coupon.ts";
10
11 export interface RetrieveCouponRequest extends Omit<GetCouponRequest, "coupon"> {}
12
13 /**
14 * Retrieve a bound Stripe Coupon over HTTP.
15 *
16 * ### Reading a Coupon
17 * **Example:** Bind and retrieve
18 * ```typescript
19 * const retrieve = yield* Stripe.RetrieveCoupon(coupon);
20 * const live = yield* retrieve();
21 * ```
22 *
23 * @binding
24 * @product Product
25 */
26 export interface RetrieveCoupon extends Binding.Service<
27 RetrieveCoupon,
28 "Stripe.RetrieveCoupon",
29 (
30 coupon: Coupon,
31 ) => Effect.Effect<
32 (request?: RetrieveCouponRequest) => Effect.Effect<StripeCoupon, GetCouponError, RuntimeContext>
33 >
34 > {}
35
36 export const RetrieveCoupon = Binding.Service<RetrieveCoupon>("Stripe.RetrieveCoupon");