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

main
ts 38 lines 1.09 KB
Raw
1 import type {
2 Account as StripeAccount,
3 UpdateAccountError,
4 UpdateAccountRequest as DistilledUpdateAccountRequest,
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 { Account } from "./Account.ts";
10
11 export interface UpdateAccountRequest extends Omit<DistilledUpdateAccountRequest, "account"> {}
12
13 /**
14 * Update a bound Stripe Connect Account over HTTP.
15 *
16 * ### Updating an Account
17 * **Example:** Bind and update
18 * ```typescript
19 * const update = yield* Stripe.UpdateAccount(merchant);
20 * const live = yield* update({ email: "merchant@example.com" });
21 * ```
22 *
23 * @binding
24 * @product Account
25 */
26 export interface UpdateAccount extends Binding.Service<
27 UpdateAccount,
28 "Stripe.UpdateAccount",
29 (
30 account: Account,
31 ) => Effect.Effect<
32 (
33 request?: UpdateAccountRequest,
34 ) => Effect.Effect<StripeAccount, UpdateAccountError, RuntimeContext>
35 >
36 > {}
37
38 export const UpdateAccount = Binding.Service<UpdateAccount>("Stripe.UpdateAccount");