ETASCOM CRM V3 - Documentation API
    Preparing search index...
    InvoiceResponseSchema: ZodObject<
        {
            id: ZodString;
            number: ZodString;
            clientId: ZodNullable<ZodString>;
            salesOrderId: ZodNullable<ZodString>;
            invoiceDate: ZodString;
            dueDate: ZodNullable<ZodString>;
            status: ZodEnum<
                [
                    "DRAFT",
                    "SENT",
                    "UNPAID",
                    "PARTIALLY_PAID",
                    "PAID",
                    "OVERDUE",
                    "CREDIT_NOTE",
                    "CANCELLED",
                ],
            >;
            subtotal: ZodNumber;
            taxRate: ZodNumber;
            taxAmount: ZodNumber;
            totalAmount: ZodNumber;
            currencyId: ZodNullable<ZodString>;
            notes: ZodNullable<ZodString>;
            createdAt: ZodString;
            updatedAt: ZodString;
            client: ZodOptional<
                ZodObject<
                    {
                        id: ZodString;
                        name: ZodString;
                        code: ZodString;
                        email: ZodNullable<ZodString>;
                        phone: ZodNullable<ZodString>;
                        paymentTermsDays: ZodNullable<ZodNumber>;
                        addresses: ZodOptional<
                            ZodArray<
                                ZodObject<
                                    {
                                        id: ZodString;
                                        street: ZodNullable<ZodString>;
                                        city: ZodNullable<ZodString>;
                                        postalCode: ZodNullable<ZodString>;
                                        state: ZodNullable<ZodString>;
                                        country: ZodNullable<ZodString>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    {
                                        id: string;
                                        street: string
                                        | null;
                                        city: string | null;
                                        postalCode: string | null;
                                        state: string | null;
                                        country: string | null;
                                    },
                                    {
                                        id: string;
                                        street: string
                                        | null;
                                        city: string | null;
                                        postalCode: string | null;
                                        state: string | null;
                                        country: string | null;
                                    },
                                >,
                                "many",
                            >,
                        >;
                        legalIdentifiers: ZodOptional<
                            ZodArray<
                                ZodObject<
                                    {
                                        id: ZodString;
                                        type: ZodString;
                                        value: ZodString;
                                        country: ZodOptional<ZodNullable<(...)>>;
                                        isActive: ZodOptional<ZodBoolean>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    {
                                        id: string;
                                        type: string;
                                        value: string;
                                        country?: string
                                        | null;
                                        isActive?: boolean;
                                    },
                                    {
                                        id: string;
                                        type: string;
                                        value: string;
                                        country?: string
                                        | null;
                                        isActive?: boolean;
                                    },
                                >,
                                "many",
                            >,
                        >;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        id: string;
                        name: string;
                        code: string;
                        email: string
                        | null;
                        phone: string | null;
                        paymentTermsDays: number | null;
                        addresses?: {
                            id: string;
                            street: string | null;
                            city: string | null;
                            postalCode: string | null;
                            state: string | null;
                            country: string | null;
                        }[];
                        legalIdentifiers?: {
                            id: string;
                            type: string;
                            value: string;
                            country?: string
                            | null;
                            isActive?: boolean;
                        }[];
                    },
                    {
                        id: string;
                        name: string;
                        code: string;
                        email: string
                        | null;
                        phone: string | null;
                        paymentTermsDays: number | null;
                        addresses?: {
                            id: string;
                            street: string | null;
                            city: string | null;
                            postalCode: string | null;
                            state: string | null;
                            country: string | null;
                        }[];
                        legalIdentifiers?: {
                            id: string;
                            type: string;
                            value: string;
                            country?: string
                            | null;
                            isActive?: boolean;
                        }[];
                    },
                >,
            >;
            currency: ZodOptional<
                ZodObject<
                    {
                        id: ZodString;
                        code: ZodString;
                        name: ZodString;
                        symbol: ZodString;
                    },
                    "strip",
                    ZodTypeAny,
                    { id: string; code: string; name: string; symbol: string },
                    { id: string; code: string; name: string; symbol: string },
                >,
            >;
            salesOrder: ZodOptional<
                ZodObject<
                    { id: ZodString; number: ZodString },
                    "strip",
                    ZodTypeAny,
                    { id: string; number: string },
                    { id: string; number: string },
                >,
            >;
            lines: ZodArray<
                ZodObject<
                    {
                        id: ZodString;
                        description: ZodString;
                        quantity: ZodNumber;
                        unitPrice: ZodNumber;
                        totalPrice: ZodNumber;
                        taxId: ZodNullable<ZodString>;
                        taxRate: ZodNumber;
                        taxAmount: ZodNumber;
                        notes: ZodNullable<ZodString>;
                        finishedProductId: ZodNullable<ZodString>;
                        finishedProduct: ZodOptional<
                            ZodObject<
                                { id: ZodString; name: ZodString; code: ZodString },
                                "strip",
                                ZodTypeAny,
                                { id: string; name: string; code: string },
                                { id: string; name: string; code: string },
                            >,
                        >;
                        tax: ZodOptional<
                            ZodObject<
                                { id: ZodString; name: ZodString; rate: ZodNumber },
                                "strip",
                                ZodTypeAny,
                                { id: string; name: string; rate: number },
                                { id: string; name: string; rate: number },
                            >,
                        >;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        id: string;
                        description: string;
                        quantity: number;
                        unitPrice: number;
                        totalPrice: number;
                        taxId: string
                        | null;
                        taxRate: number;
                        taxAmount: number;
                        notes: string | null;
                        finishedProductId: string | null;
                        finishedProduct?: { id: string; name: string; code: string };
                        tax?: { id: string; name: string; rate: number };
                    },
                    {
                        id: string;
                        description: string;
                        quantity: number;
                        unitPrice: number;
                        totalPrice: number;
                        taxId: string
                        | null;
                        taxRate: number;
                        taxAmount: number;
                        notes: string | null;
                        finishedProductId: string | null;
                        finishedProduct?: { id: string; name: string; code: string };
                        tax?: { id: string; name: string; rate: number };
                    },
                >,
                "many",
            >;
        },
        "strip",
        ZodTypeAny,
        {
            id: string;
            number: string;
            clientId: string
            | null;
            salesOrderId: string | null;
            invoiceDate: string;
            dueDate: string | null;
            status:
                | "DRAFT"
                | "SENT"
                | "CANCELLED"
                | "PAID"
                | "PARTIALLY_PAID"
                | "UNPAID"
                | "OVERDUE"
                | "CREDIT_NOTE";
            subtotal: number;
            taxRate: number;
            taxAmount: number;
            totalAmount: number;
            currencyId: string
            | null;
            notes: string | null;
            createdAt: string;
            updatedAt: string;
            client?: {
                id: string;
                name: string;
                code: string;
                email: string | null;
                phone: string | null;
                paymentTermsDays: number | null;
                addresses?: {
                    id: string;
                    street: string | null;
                    city: string | null;
                    postalCode: string | null;
                    state: string | null;
                    country: string | null;
                }[];
                legalIdentifiers?: {
                    id: string;
                    type: string;
                    value: string;
                    country?: string
                    | null;
                    isActive?: boolean;
                }[];
            };
            currency?: { id: string; code: string; name: string; symbol: string };
            salesOrder?: { id: string; number: string };
            lines: {
                id: string;
                description: string;
                quantity: number;
                unitPrice: number;
                totalPrice: number;
                taxId: string | null;
                taxRate: number;
                taxAmount: number;
                notes: string | null;
                finishedProductId: string | null;
                finishedProduct?: { id: string; name: string; code: string };
                tax?: { id: string; name: string; rate: number };
            }[];
        },
        {
            id: string;
            number: string;
            clientId: string
            | null;
            salesOrderId: string | null;
            invoiceDate: string;
            dueDate: string | null;
            status:
                | "DRAFT"
                | "SENT"
                | "CANCELLED"
                | "PAID"
                | "PARTIALLY_PAID"
                | "UNPAID"
                | "OVERDUE"
                | "CREDIT_NOTE";
            subtotal: number;
            taxRate: number;
            taxAmount: number;
            totalAmount: number;
            currencyId: string
            | null;
            notes: string | null;
            createdAt: string;
            updatedAt: string;
            client?: {
                id: string;
                name: string;
                code: string;
                email: string | null;
                phone: string | null;
                paymentTermsDays: number | null;
                addresses?: {
                    id: string;
                    street: string | null;
                    city: string | null;
                    postalCode: string | null;
                    state: string | null;
                    country: string | null;
                }[];
                legalIdentifiers?: {
                    id: string;
                    type: string;
                    value: string;
                    country?: string
                    | null;
                    isActive?: boolean;
                }[];
            };
            currency?: { id: string; code: string; name: string; symbol: string };
            salesOrder?: { id: string; number: string };
            lines: {
                id: string;
                description: string;
                quantity: number;
                unitPrice: number;
                totalPrice: number;
                taxId: string | null;
                taxRate: number;
                taxAmount: number;
                notes: string | null;
                finishedProductId: string | null;
                finishedProduct?: { id: string; name: string; code: string };
                tax?: { id: string; name: string; rate: number };
            }[];
        },
    > = ...