CreateOrderSchema: 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>;
                        },
                        {
                            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;
                        modifiers?: {
                            modifierId: string;
                            parentId: string;
                            name: string;
                            price: number;
                            modifierName: string;
                        }[];
                    },
                    {
                        id: string;
                        quantity: number;
                        note?: string;
                        modifiers?: {
                            modifierId: string;
                            parentId: string;
                            name: string;
                            price: number;
                            modifierName: string;
                        }[];
                    },
                >,
                "many",
            >;
            summary: ZodOptional<ZodAny>;
            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;
            modifiers?: {
                modifierId: string;
                parentId: string;
                name: string;
                price: number;
                modifierName: string;
            }[];
        }[];
        summary?: any;
        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;
            modifiers?: {
                modifierId: string;
                parentId: string;
                name: string;
                price: number;
                modifierName: string;
            }[];
        }[];
        summary?: any;
        couponCode?: null
        | string;
    },
> = ...

Schema for creating a new order Extends BaseOrderSchema with required items and optional summary

const newOrder = {
orderType: "delivery",
pickupType: "asap",
tipAmount: 5.00,
items: [
{ menuItemId: "item1", quantity: 2, price: 12.99 }
],
couponCode: "SAVE10"
};