The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type { |
| 2 | GetPaymentLinkError, |
| 3 | GetPaymentLinkRequest, |
| 4 | PaymentLink as StripePaymentLink, |
| 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 { PaymentLink } from "./PaymentLink.ts"; |
| 10 | |
| 11 | export interface RetrievePaymentLinkRequest extends Omit<GetPaymentLinkRequest, "payment_link"> {} |
| 12 | |
| 13 | /** |
| 14 | * Retrieve a bound Stripe Payment Link over HTTP. |
| 15 | * |
| 16 | * ### Reading a Payment Link |
| 17 | * **Example:** Bind and retrieve |
| 18 | * ```typescript |
| 19 | * const retrieve = yield* Stripe.RetrievePaymentLink(checkout); |
| 20 | * const live = yield* retrieve(); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | * @product Checkout |
| 25 | */ |
| 26 | export interface RetrievePaymentLink extends Binding.Service< |
| 27 | RetrievePaymentLink, |
| 28 | "Stripe.RetrievePaymentLink", |
| 29 | ( |
| 30 | paymentLink: PaymentLink, |
| 31 | ) => Effect.Effect< |
| 32 | ( |
| 33 | request?: RetrievePaymentLinkRequest, |
| 34 | ) => Effect.Effect<StripePaymentLink, GetPaymentLinkError, RuntimeContext> |
| 35 | > |
| 36 | > {} |
| 37 | |
| 38 | export const RetrievePaymentLink = Binding.Service<RetrievePaymentLink>( |
| 39 | "Stripe.RetrievePaymentLink", |
| 40 | ); |