UNPKG

@paykit-sdk/core

Version:

The Payment Toolkit for Typescript

147 lines (144 loc) 3.44 kB
import { z } from 'zod'; interface BillingAddress { /** * Full name of the recipient */ name: string; /** * Primary street address */ line1: string; /** * Secondary address (apartment, suite, unit, etc.) */ line2?: string; /** * City */ city: string; /** * State, province, or region */ state?: string; /** * Postal code or ZIP code */ postal_code: string; /** * Country code (ISO 3166-1 alpha-2) * Examples: "US", "GB", "CA", "DE", etc. */ country: string; /** * Contact phone number for delivery */ phone?: string; } /** * Billing address */ declare const billingAddressSchema: z.ZodObject<{ name: z.ZodString; line1: z.ZodString; line2: z.ZodOptional<z.ZodDefault<z.ZodString>>; city: z.ZodString; state: z.ZodOptional<z.ZodString>; postal_code: z.ZodString; country: z.ZodString; phone: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; line1: string; city: string; postal_code: string; country: string; line2?: string | undefined; state?: string | undefined; phone?: string | undefined; }, { name: string; line1: string; city: string; postal_code: string; country: string; line2?: string | undefined; state?: string | undefined; phone?: string | undefined; }>; interface BillingInfo { /** * Billing address */ address: BillingAddress; /** * Billing carrier preference (optional) * Provider-specific values */ carrier?: string; /** * Currency */ currency: string; } /** * Complete billing information including carrier preferences */ declare const billingSchema: z.ZodObject<{ address: z.ZodObject<{ name: z.ZodString; line1: z.ZodString; line2: z.ZodOptional<z.ZodDefault<z.ZodString>>; city: z.ZodString; state: z.ZodOptional<z.ZodString>; postal_code: z.ZodString; country: z.ZodString; phone: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; line1: string; city: string; postal_code: string; country: string; line2?: string | undefined; state?: string | undefined; phone?: string | undefined; }, { name: string; line1: string; city: string; postal_code: string; country: string; line2?: string | undefined; state?: string | undefined; phone?: string | undefined; }>; carrier: z.ZodOptional<z.ZodString>; currency: z.ZodString; }, "strip", z.ZodTypeAny, { address: { name: string; line1: string; city: string; postal_code: string; country: string; line2?: string | undefined; state?: string | undefined; phone?: string | undefined; }; currency: string; carrier?: string | undefined; }, { address: { name: string; line1: string; city: string; postal_code: string; country: string; line2?: string | undefined; state?: string | undefined; phone?: string | undefined; }; currency: string; carrier?: string | undefined; }>; export { type BillingAddress, type BillingInfo, billingAddressSchema, billingSchema };