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