The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import type { |
| 2 | BillingCreditGrant as StripeCreditGrant, |
| 3 | GetBillingCreditGrantError, |
| 4 | GetBillingCreditGrantRequest, |
| 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 { CreditGrant } from "./CreditGrant.ts"; |
| 10 | |
| 11 | export interface RetrieveCreditGrantRequest extends Omit<GetBillingCreditGrantRequest, "id"> {} |
| 12 | |
| 13 | /** |
| 14 | * Retrieve a bound Stripe Credit Grant over HTTP. |
| 15 | * |
| 16 | * ### Reading a Credit Grant |
| 17 | * **Example:** Bind and retrieve |
| 18 | * ```typescript |
| 19 | * const retrieve = yield* Stripe.RetrieveCreditGrant(grant); |
| 20 | * const live = yield* retrieve(); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | * @product Billing |
| 25 | */ |
| 26 | export interface RetrieveCreditGrant extends Binding.Service< |
| 27 | RetrieveCreditGrant, |
| 28 | "Stripe.RetrieveCreditGrant", |
| 29 | ( |
| 30 | grant: CreditGrant, |
| 31 | ) => Effect.Effect< |
| 32 | ( |
| 33 | request?: RetrieveCreditGrantRequest, |
| 34 | ) => Effect.Effect<StripeCreditGrant, GetBillingCreditGrantError, RuntimeContext> |
| 35 | > |
| 36 | > {} |
| 37 | |
| 38 | export const RetrieveCreditGrant = Binding.Service<RetrieveCreditGrant>( |
| 39 | "Stripe.RetrieveCreditGrant", |
| 40 | ); |