UNPKG

@betterstore/react

Version:

288 lines (287 loc) 9.71 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.ZodNullable<z.ZodString>>; city: z.ZodString; province: z.ZodOptional<z.ZodNullable<z.ZodString>>; provinceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>; zipCode: z.ZodString; country: z.ZodString; countryCode: z.ZodString; company: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }, { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }>; phone: z.ZodEffects<z.ZodString, string, string>; isSubscribedEmail: z.ZodOptional<z.ZodBoolean>; isSubscribedSMS: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { email: string; firstName: string; lastName: string; address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }; phone: string; isSubscribedEmail?: boolean | undefined; isSubscribedSMS?: boolean | undefined; }, { email: string; firstName: string; lastName: string; address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }; phone: string; isSubscribedEmail?: boolean | undefined; isSubscribedSMS?: boolean | undefined; }>; export declare const shipmentsFormSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{ rateId: z.ZodString; carrierId: z.ZodOptional<z.ZodString>; priceInCents: z.ZodNumber; pickupPointId: z.ZodOptional<z.ZodString>; pickupPointDisplayName: z.ZodOptional<z.ZodString>; displayName: z.ZodString; }, "strip", z.ZodTypeAny, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }>>, Record<string, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }>, Record<string, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; 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.ZodNullable<z.ZodString>>; city: z.ZodString; province: z.ZodOptional<z.ZodNullable<z.ZodString>>; provinceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>; zipCode: z.ZodString; country: z.ZodString; countryCode: z.ZodString; company: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }, { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }>; phone: z.ZodEffects<z.ZodString, string, string>; isSubscribedEmail: z.ZodOptional<z.ZodBoolean>; isSubscribedSMS: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { email: string; firstName: string; lastName: string; address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }; phone: string; isSubscribedEmail?: boolean | undefined; isSubscribedSMS?: boolean | undefined; }, { email: string; firstName: string; lastName: string; address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }; phone: string; isSubscribedEmail?: boolean | undefined; isSubscribedSMS?: boolean | undefined; }>; shipping: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{ rateId: z.ZodString; carrierId: z.ZodOptional<z.ZodString>; priceInCents: z.ZodNumber; pickupPointId: z.ZodOptional<z.ZodString>; pickupPointDisplayName: z.ZodOptional<z.ZodString>; displayName: z.ZodString; }, "strip", z.ZodTypeAny, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }>>, Record<string, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }>, Record<string, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }>>; customerId: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { customer: { email: string; firstName: string; lastName: string; address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }; phone: string; isSubscribedEmail?: boolean | undefined; isSubscribedSMS?: boolean | undefined; }; shipping: Record<string, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; pickupPointId?: string | undefined; pickupPointDisplayName?: string | undefined; }>; customerId?: string | undefined; }, { customer: { email: string; firstName: string; lastName: string; address: { line1: string; city: string; zipCode: string; country: string; countryCode: string; line2?: string | null | undefined; province?: string | null | undefined; provinceCode?: string | null | undefined; company?: string | null | undefined; }; phone: string; isSubscribedEmail?: boolean | undefined; isSubscribedSMS?: boolean | undefined; }; shipping: Record<string, { priceInCents: number; rateId: string; displayName: string; carrierId?: string | undefined; 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 ShipmentsFormData = z.infer<typeof shipmentsFormSchema>;