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

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