@devries-cameron20 / t3code Mirror · read-only
Fork 0

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, 04:45 UTC

main
ts 37 lines 1.02 KB
Raw
1 import type {
2 Customer as StripeCustomer,
3 CreateCustomerError,
4 CreateCustomerRequest,
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
10 /**
11 * Create a Stripe Customer over HTTP. Account-scoped — binds the API key
12 * onto the host, not a specific customer resource.
13 *
14 * ### Creating a Customer at runtime
15 * **Example:** Bind and create
16 * ```typescript
17 * const create = yield* Stripe.CreateCustomer();
18 * const customer = yield* create({
19 * email: "alice@example.com",
20 * name: "Alice",
21 * });
22 * ```
23 *
24 * @binding
25 * @product Customer
26 */
27 export interface CreateCustomer extends Binding.Service<
28 CreateCustomer,
29 "Stripe.CreateCustomer",
30 () => Effect.Effect<
31 (
32 request: CreateCustomerRequest,
33 ) => Effect.Effect<StripeCustomer, CreateCustomerError, RuntimeContext>
34 >
35 > {}
36
37 export const CreateCustomer = Binding.Service<CreateCustomer>("Stripe.CreateCustomer");