The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type { |
| 2 | BillingCreditGrant as StripeCreditGrant, |
| 3 | UpdateBillingCreditGrantError, |
| 4 | UpdateBillingCreditGrantRequest, |
| 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 UpdateCreditGrantRequest extends Omit<UpdateBillingCreditGrantRequest, "id"> {} |
| 12 | |
| 13 | /** |
| 14 | * Update a bound Stripe Credit Grant over HTTP. Mutable fields are |
| 15 | * `expires_at` and `metadata`. |
| 16 | * |
| 17 | * ### Updating a Credit Grant |
| 18 | * **Example:** Bind and update |
| 19 | * ```typescript |
| 20 | * const update = yield* Stripe.UpdateCreditGrant(grant); |
| 21 | * const live = yield* update({ expires_at: 4102444800 }); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | * @product Billing |
| 26 | */ |
| 27 | export interface UpdateCreditGrant extends Binding.Service< |
| 28 | UpdateCreditGrant, |
| 29 | "Stripe.UpdateCreditGrant", |
| 30 | ( |
| 31 | grant: CreditGrant, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request?: UpdateCreditGrantRequest, |
| 35 | ) => Effect.Effect<StripeCreditGrant, UpdateBillingCreditGrantError, RuntimeContext> |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const UpdateCreditGrant = Binding.Service<UpdateCreditGrant>("Stripe.UpdateCreditGrant"); |