| 1 | import { CreateCheckoutSession as createCheckoutSessionOp } from "@distilled.cloud/stripe/stripe"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { CreateCheckoutSession } from "./CreateCheckoutSession.ts"; |
| 4 | import { makeHttpStripeAccountBinding } from "./StripeHttp.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link CreateCheckoutSession}. Provide it on the |
| 8 | * Function or Worker Effect. |
| 9 | * |
| 10 | * @layer |
| 11 | * @product Checkout |
| 12 | * @provides Stripe.CreateCheckoutSession |
| 13 | */ |
| 14 | export const CreateCheckoutSessionHttp = Layer.effect( |
| 15 | CreateCheckoutSession, |
| 16 | makeHttpStripeAccountBinding({ |
| 17 | tag: "Stripe.CreateCheckoutSession", |
| 18 | operation: createCheckoutSessionOp, |
| 19 | permissions: ["checkout_sessions_write"], |
| 20 | }), |
| 21 | ); |