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

main
ts 38 lines 1.1 KB
Raw
1 import type {
2 Customer as StripeCustomer,
3 UpdateCustomerError,
4 UpdateCustomerRequest as DistilledUpdateCustomerRequest,
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 { Customer } from "./Customer.ts";
10
11 export interface UpdateCustomerRequest extends Omit<DistilledUpdateCustomerRequest, "customer"> {}
12
13 /**
14 * Update a bound Stripe Customer over HTTP.
15 *
16 * ### Updating a Customer
17 * **Example:** Bind and update
18 * ```typescript
19 * const update = yield* Stripe.UpdateCustomer(alice);
20 * const live = yield* update({ name: "Alice Example" });
21 * ```
22 *
23 * @binding
24 * @product Customer
25 */
26 export interface UpdateCustomer extends Binding.Service<
27 UpdateCustomer,
28 "Stripe.UpdateCustomer",
29 (
30 customer: Customer,
31 ) => Effect.Effect<
32 (
33 request?: UpdateCustomerRequest,
34 ) => Effect.Effect<StripeCustomer, UpdateCustomerError, RuntimeContext>
35 >
36 > {}
37
38 export const UpdateCustomer = Binding.Service<UpdateCustomer>("Stripe.UpdateCustomer");