/** * Stripe client types. */ import type { BaseIntegrationClient } from "../../types.js"; import type { SupportsApiRequest } from "../base/index.js"; /** * Stripe client for payments and subscriptions. * * Provides the generic apiRequest() method for any Stripe API endpoint. * Use this to interact with Stripe's customers, payments, subscriptions, and other endpoints. * * @example * ```typescript * import { z } from 'zod'; * * // Declare in api(): integrations: { stripe: stripe(INTEGRATION_ID) } * // In run(), access via ctx.integrations.stripe * * // Define schemas * const CustomerSchema = z.object({ * id: z.string(), * email: z.string().email(), * name: z.string().optional(), * created: z.number(), * }); * * const CreateCustomerRequestSchema = z.object({ * email: z.string().email(), * name: z.string().optional(), * }); * * // Get a customer * const customer = await ctx.integrations.stripe.apiRequest( * { * method: 'GET', * path: '/v1/customers/cus_123', * }, * { response: CustomerSchema } * ); * * // Create a customer * const newCustomer = await ctx.integrations.stripe.apiRequest( * { * method: 'POST', * path: '/v1/customers', * body: { * email: 'customer@example.com', * name: 'John Doe', * }, * }, * { * body: CreateCustomerRequestSchema, * response: CustomerSchema, * } * ); * ``` */ export interface StripeClient extends BaseIntegrationClient, SupportsApiRequest { } //# sourceMappingURL=types.d.ts.map