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

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