Variable OrderSchemaConst
OrderSchema: ZodObject<
extendShape<
{
orderType: ZodDefault<ZodString>;
billing: ZodOptional<
ZodObject<
{
firstName: ZodString;
lastName: ZodString;
email: ZodOptional<ZodString>;
paymentMethod: ZodString;
phone: ZodOptional<ZodString>;
pickupMethod: ZodDefault<ZodString>;
streetAddress: ZodOptional<ZodString>;
city: ZodOptional<ZodString>;
country: ZodOptional<ZodString>;
state: ZodOptional<ZodString>;
zipCode: ZodOptional<ZodString>;
},
"strip",
ZodTypeAny,
{
firstName: string;
lastName: string;
email?: string;
paymentMethod: string;
phone?: string;
pickupMethod: string;
streetAddress?: string;
city?: string;
country?: string;
state?: string;
zipCode?: string;
},
{
firstName: string;
lastName: string;
email?: string;
paymentMethod: string;
phone?: string;
pickupMethod?: string;
streetAddress?: string;
city?: string;
country?: string;
state?: string;
zipCode?: string;
},
>,
>;
note: ZodOptional<ZodString>;
source: ZodOptional<ZodString>;
pickupTime: ZodOptional<ZodString>;
pickupDate: ZodOptional<ZodString>;
pickupType: ZodString;
tipAmount: ZodNumber;
isPaid: ZodOptional<ZodBoolean>;
status: ZodOptional<
ZodEnum<["pending", "done", "served", "preparing", "dispatched"]>,
>;
},
{
items: ZodArray<
ZodObject<
extendShape<
{
id: ZodString;
quantity: ZodNumber;
note: ZodOptional<ZodString>;
},
{
name: ZodString;
totalPrice: ZodNumber;
unitPrice: ZodNumber;
image: ZodString;
modifiers: ZodOptional<
ZodArray<
ZodObject<
extendShape<(...), (...)>,
"strip",
ZodTypeAny,
{
modifierId: ...;
parentId: ...;
name: ...;
price: ...;
modifierName: ...;
},
{
modifierId: ...;
parentId: ...;
name: ...;
price: ...;
modifierName: ...;
},
>,
"many",
>,
>;
},
>,
"strip",
ZodTypeAny,
{
id: string;
quantity: number;
note?: string;
name: string;
totalPrice: number;
unitPrice: number;
image: string;
modifiers?: {
modifierId: string;
parentId: string;
name: string;
price: number;
modifierName: string;
}[];
},
{
id: string;
quantity: number;
note?: string;
name: string;
totalPrice: number;
unitPrice: number;
image: string;
modifiers?: {
modifierId: string;
parentId: string;
name: string;
price: number;
modifierName: string;
}[];
},
>,
"many",
>;
totalAmount: ZodNumber;
createdAt: ZodAny;
customerName: ZodString;
orderId: ZodString;
discountAmount: ZodNumber;
subtotal: ZodNumber;
tax: ZodNumber;
taxPercentage: ZodString;
couponCode: ZodOptional<ZodNullable<ZodString>>;
},
>,
"strip",
ZodTypeAny,
{
orderType: string;
billing?: {
firstName: string;
lastName: string;
email?: string;
paymentMethod: string;
phone?: string;
pickupMethod: string;
streetAddress?: string;
city?: string;
country?: string;
state?: string;
zipCode?: string;
};
note?: string;
source?: string;
pickupTime?: string;
pickupDate?: string;
pickupType: string;
tipAmount: number;
isPaid?: boolean;
status?: "pending"
| "done"
| "served"
| "preparing"
| "dispatched";
items: {
id: string;
quantity: number;
note?: string;
name: string;
totalPrice: number;
unitPrice: number;
image: string;
modifiers?: {
modifierId: string;
parentId: string;
name: string;
price: number;
modifierName: string;
}[];
}[];
totalAmount: number;
createdAt?: any;
customerName: string;
orderId: string;
discountAmount: number;
subtotal: number;
tax: number;
taxPercentage: string;
couponCode?: null
| string;
},
{
orderType?: string;
billing?: {
firstName: string;
lastName: string;
email?: string;
paymentMethod: string;
phone?: string;
pickupMethod?: string;
streetAddress?: string;
city?: string;
country?: string;
state?: string;
zipCode?: string;
};
note?: string;
source?: string;
pickupTime?: string;
pickupDate?: string;
pickupType: string;
tipAmount: number;
isPaid?: boolean;
status?: "pending"
| "done"
| "served"
| "preparing"
| "dispatched";
items: {
id: string;
quantity: number;
note?: string;
name: string;
totalPrice: number;
unitPrice: number;
image: string;
modifiers?: {
modifierId: string;
parentId: string;
name: string;
price: number;
modifierName: string;
}[];
}[];
totalAmount: number;
createdAt?: any;
customerName: string;
orderId: string;
discountAmount: number;
subtotal: number;
tax: number;
taxPercentage: string;
couponCode?: null
| string;
},
> = ...
Complete order schema with all computed fields Extends BaseOrderSchema with calculated totals and metadata