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

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