UNPKG

@betterstore/react

Version:

E-commerce for Developers

228 lines (227 loc) 6.46 kB
import { z } from "zod"; export declare const customerSchema: z.ZodObject<{ email: z.ZodString; firstName: z.ZodString; lastName: z.ZodString; address: z.ZodObject<{ line1: z.ZodString; line2: z.ZodOptional<z.ZodString>; city: z.ZodString; state: z.ZodOptional<z.ZodString>; zipCode: z.ZodString; country: z.ZodString; countryCode: z.ZodString; }, "strip", z.ZodTypeAny, { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }, { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }>; saveInfo: z.ZodOptional<z.ZodBoolean>; phone: z.ZodString; }, "strip", z.ZodTypeAny, { address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }; email: string; firstName: string; lastName: string; phone: string; saveInfo?: boolean | undefined; }, { address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }; email: string; firstName: string; lastName: string; phone: string; saveInfo?: boolean | undefined; }>; export declare const shippingMethodSchema: z.ZodObject<{ rateId: z.ZodString; provider: z.ZodString; price: z.ZodNumber; name: z.ZodString; pickupPointId: z.ZodOptional<z.ZodString>; pickupPointDisplayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { rateId: string; provider: string; price: number; name: string; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }, { rateId: string; provider: string; price: number; name: string; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }>; export declare const checkoutSchema: z.ZodObject<{ customer: z.ZodObject<{ email: z.ZodString; firstName: z.ZodString; lastName: z.ZodString; address: z.ZodObject<{ line1: z.ZodString; line2: z.ZodOptional<z.ZodString>; city: z.ZodString; state: z.ZodOptional<z.ZodString>; zipCode: z.ZodString; country: z.ZodString; countryCode: z.ZodString; }, "strip", z.ZodTypeAny, { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }, { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }>; saveInfo: z.ZodOptional<z.ZodBoolean>; phone: z.ZodString; }, "strip", z.ZodTypeAny, { address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }; email: string; firstName: string; lastName: string; phone: string; saveInfo?: boolean | undefined; }, { address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }; email: string; firstName: string; lastName: string; phone: string; saveInfo?: boolean | undefined; }>; shipping: z.ZodObject<{ rateId: z.ZodString; provider: z.ZodString; price: z.ZodNumber; name: z.ZodString; pickupPointId: z.ZodOptional<z.ZodString>; pickupPointDisplayName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { rateId: string; provider: string; price: number; name: string; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }, { rateId: string; provider: string; price: number; name: string; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }>; customerId: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { customer: { address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }; email: string; firstName: string; lastName: string; phone: string; saveInfo?: boolean | undefined; }; shipping: { rateId: string; provider: string; price: number; name: string; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }; customerId?: string | undefined; }, { customer: { address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | undefined; state?: string | undefined; }; email: string; firstName: string; lastName: string; phone: string; saveInfo?: boolean | undefined; }; shipping: { rateId: string; provider: string; price: number; name: string; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }; customerId?: string | undefined; }>; export type CheckoutFormData = z.infer<typeof checkoutSchema>; export type CustomerFormData = z.infer<typeof customerSchema>; export type ShippingMethodFormData = z.infer<typeof shippingMethodSchema>;