Pennylane API Client
    Preparing search index...

    Variable PennylaneApiConst

    PennylaneApi: {
        customerInvoices: {
            categorizeCustomerInvoice: (
                customerInvoiceId: number,
                body: CategorizeCustomerInvoiceBody,
            ) => Effect<
                readonly {
                    analytical_code: string
                    | null;
                    category_group: { id: number };
                    created_at: string;
                    id: number;
                    label: string;
                    updated_at: string;
                    weight: string;
                }[],
                CategorizeCustomerInvoiceError,
                PennylaneClient,
            >;
            createCustomerInvoice: (
                body: CreateCustomerInvoiceBody,
            ) => Effect<
                {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                },
                CreateCustomerInvoiceError,
                PennylaneClient,
            >;
            createCustomerInvoiceFromQuote: (
                body: CreateCustomerInvoiceFromQuoteBody,
            ) => Effect<
                {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                },
                CreateCustomerInvoiceFromQuoteError,
                PennylaneClient,
            >;
            deleteCustomerInvoice: (
                invoiceId: number,
            ) => Effect<void, DeleteCustomerInvoiceError, PennylaneClient>;
            finalizeCustomerInvoice: (
                invoiceId: number,
            ) => Effect<
                {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                },
                FinalizeCustomerInvoiceError,
                PennylaneClient,
            >;
            getCustomerInvoice: (
                customerInvoiceId: number,
            ) => Effect<
                {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                },
                GetCustomerInvoiceError,
                PennylaneClient,
            >;
            getCustomerInvoiceAppendices: (
                customerInvoiceId: number,
                params?: GetCustomerInvoiceAppendicesQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        created_at: string;
                        filename: string;
                        id: number;
                        updated_at: string;
                        url: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerInvoiceAppendicesError,
                PennylaneClient,
            >;
            getCustomerInvoiceCategories: (
                customerInvoiceId: number,
                params?: GetCustomerInvoiceCategoriesQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        analytical_code: string
                        | null;
                        category_group: { id: number };
                        created_at: string;
                        id: number;
                        label: string;
                        updated_at: string;
                        weight: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerInvoiceCategoriesError,
                PennylaneClient,
            >;
            getCustomerInvoiceCustomHeaderFields: (
                customerInvoiceId: number,
                params?: GetCustomerInvoiceCustomHeaderFieldsQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        created_at: string;
                        id: number;
                        rank: number;
                        title: string;
                        updated_at: string;
                        value: string
                        | null;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerInvoiceCustomHeaderFieldsError,
                PennylaneClient,
            >;
            getCustomerInvoiceInvoiceLines: (
                customerInvoiceId: number,
                params?: GetCustomerInvoiceInvoiceLinesQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        amount: string;
                        created_at: string;
                        currency_amount: string;
                        currency_amount_before_tax: string;
                        currency_tax: string;
                        description: string;
                        discount: { type: "absolute"
                        | "relative"; value: string };
                        id: number;
                        imputation_dates: { end_date: string; start_date: string } | null;
                        label: string;
                        product: { id: number; url: string } | null;
                        quantity: string;
                        raw_currency_unit_price: string;
                        section_rank: number | null;
                        tax: string;
                        unit: string | null;
                        updated_at: string;
                        vat_rate: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerInvoiceInvoiceLinesError,
                PennylaneClient,
            >;
            getCustomerInvoiceInvoiceLineSections: (
                customerInvoiceId: number,
                params?: GetCustomerInvoiceInvoiceLineSectionsQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        created_at: string;
                        description: string
                        | null;
                        id: number;
                        rank: number;
                        title: string | null;
                        updated_at: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerInvoiceInvoiceLineSectionsError,
                PennylaneClient,
            >;
            getCustomerInvoiceMatchedTransactions: (
                customerInvoiceId: number,
                params?: GetCustomerInvoiceMatchedTransactionsQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        amount: string;
                        archived_at: string
                        | null;
                        attachment_required: boolean;
                        bank_account: { id: number; url: string };
                        categories: readonly {
                            analytical_code: string | null;
                            category_group: { id: number };
                            created_at: string;
                            id: number;
                            label: string;
                            updated_at: string;
                            weight: string;
                        }[];
                        created_at: string;
                        currency: string
                        | null;
                        currency_amount: string;
                        currency_fee: string | null;
                        customer: { id: number; url: string } | null;
                        date: string;
                        fee: string | null;
                        id: number;
                        journal: { id: number };
                        label: string | null;
                        outstanding_balance: string | null;
                        pro_account_expense:
                            | {
                                card_masked_number: string;
                                employee: { first_name: ...; id: ...; last_name: ... }
                                | null;
                            }
                            | null;
                        updated_at: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerInvoiceMatchedTransactionsError,
                PennylaneClient,
            >;
            getCustomerInvoicePayments: (
                customerInvoiceId: number,
                params?: GetCustomerInvoicePaymentsQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        created_at: string;
                        currency: string
                        | null;
                        currency_amount: string;
                        id: number;
                        label: string;
                        status:
                            | "error"
                            | "submitted"
                            | "cancelled"
                            | "initiated"
                            | "pending"
                            | "emitted"
                            | "found"
                            | "not_found"
                            | "aborted"
                            | "refunded"
                            | "prepared"
                            | "pending_customer_approval"
                            | "pending_submission"
                            | "confirmed"
                            | "paid_out"
                            | "customer_approval_denied"
                            | "failed"
                            | "charged_back"
                            | "resubmission_requested";
                        updated_at: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerInvoicePaymentsError,
                PennylaneClient,
            >;
            getCustomerInvoices: (
                params?: GetCustomerInvoicesQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        amount: string;
                        appendices: { url: string };
                        archived_at: string | null;
                        billing_subscription: { id: number } | null;
                        categories: { url: string };
                        created_at: string;
                        credited_invoice: { id: number; url: string } | null;
                        currency: string;
                        currency_amount: string;
                        currency_amount_before_tax: string;
                        currency_tax: string;
                        custom_header_fields: { url: string };
                        customer: { id: number; url: string } | null;
                        customer_invoice_template: { id: number } | null;
                        date: string | null;
                        deadline: string | null;
                        discount: { type: "absolute" | "relative"; value: string };
                        draft: boolean;
                        e_invoicing:
                            | {
                                reason: string
                                | null;
                                status:
                                    | "accepted"
                                    | "approved"
                                    | "collected"
                                    | "in_dispute"
                                    | "partially_collected"
                                    | "refused"
                                    | "rejected"
                                    | "sent"
                                    | "submitted";
                            }
                            | null;
                        exchange_rate: string;
                        external_reference: string;
                        filename: string
                        | null;
                        id: number;
                        invoice_line_sections: { url: string };
                        invoice_lines: { url: string };
                        invoice_number: string;
                        label: string | null;
                        language: "fr_FR" | "en_GB";
                        ledger_entry: { id: number };
                        matched_transactions: { url: string };
                        paid: boolean;
                        payments: { url: string };
                        pdf_description: string | null;
                        pdf_invoice_free_text: string;
                        pdf_invoice_subject: string;
                        public_file_url: string | null;
                        quote: { id: number } | null;
                        remaining_amount_with_tax: string | null;
                        remaining_amount_without_tax: string | null;
                        special_mention: string | null;
                        status:
                            | "paid"
                            | "archived"
                            | "incomplete"
                            | "cancelled"
                            | "partially_paid"
                            | "partially_cancelled"
                            | "upcoming"
                            | "late"
                            | "draft"
                            | "credit_note";
                        tax: string;
                        transaction_reference: | {
                            banking_provider: string;
                            provider_field_name: string;
                            provider_field_value: string;
                        }
                        | null;
                        updated_at: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerInvoicesError,
                PennylaneClient,
            >;
            importCustomerInvoice: (
                body: ImportCustomerInvoiceBody,
            ) => Effect<
                {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                },
                ImportCustomerInvoiceError,
                PennylaneClient,
            >;
            linkCreditNote: (
                customerInvoiceId: number,
                body: LinkCreditNoteBody,
            ) => Effect<
                {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                },
                LinkCreditNoteError,
                PennylaneClient,
            >;
            markAsPaid: (
                invoiceId: number,
            ) => Effect<void, MarkCustomerInvoiceAsPaidError, PennylaneClient>;
            sendCustomerInvoiceByEmail: (
                customerInvoiceId: number,
                body?: SendCustomerInvoiceByEmailBody,
            ) => Effect<void, SendCustomerInvoiceByEmailError, PennylaneClient>;
            updateCustomerInvoice: (
                invoiceId: number,
                body: UpdateCustomerInvoiceBody,
            ) => Effect<
                {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                },
                UpdateCustomerInvoiceError,
                PennylaneClient,
            >;
            updateImportedCustomerInvoice: (
                invoiceId: number,
                body: UpdateImportedCustomerInvoiceBody,
            ) => Effect<
                {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                },
                UpdateImportedCustomerInvoiceError,
                PennylaneClient,
            >;
            uploadCustomerInvoiceAppendix: (
                customerInvoiceId: number,
                body: UploadCustomerInvoiceAppendixBody,
            ) => Effect<
                {
                    created_at: string;
                    filename: string;
                    id: number;
                    updated_at: string;
                    url: string;
                },
                UploadCustomerInvoiceAppendixError,
                PennylaneClient,
            >;
        };
        customers: {
            categorizeCustomer: (
                id: string,
                body: CategorizeCustomerBody,
            ) => Effect<
                readonly {
                    analytical_code: string
                    | null;
                    category_group: { id: number };
                    created_at: string;
                    id: number;
                    label: string;
                    updated_at: string;
                    weight: string;
                }[],
                CategorizeCustomerError,
                PennylaneClient,
            >;
            createCompanyCustomer: (
                body: CreateCompanyCustomerBody,
            ) => Effect<
                {
                    billing_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    billing_iban: string
                    | null;
                    billing_language: "fr_FR" | "en_GB" | "de_DE";
                    contacts: { url: string };
                    created_at: string;
                    delivery_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    emails: readonly string[];
                    external_reference: string;
                    id: number;
                    ledger_account: { id: number }
                    | null;
                    mandates: { url: string };
                    name: string;
                    notes: string | null;
                    payment_conditions:
                        | "upon_receipt"
                        | "custom"
                        | "7_days"
                        | "15_days"
                        | "30_days"
                        | "30_days_end_of_month"
                        | "45_days"
                        | "45_days_end_of_month"
                        | "60_days";
                    phone: string;
                    pro_account_mandates: { url: string };
                    recipient: string;
                    reference: string | null;
                    reg_no: string;
                    updated_at: string;
                    vat_number: string;
                },
                CreateCompanyCustomerError,
                PennylaneClient,
            >;
            createIndividualCustomer: (
                body: CreateIndividualCustomerBody,
            ) => Effect<
                {
                    billing_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    billing_iban: string
                    | null;
                    billing_language: "fr_FR" | "en_GB" | "de_DE";
                    contacts: { url: string };
                    created_at: string;
                    delivery_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    emails: readonly string[];
                    external_reference: string;
                    first_name: string;
                    id: number;
                    last_name: string;
                    ledger_account: { id: number }
                    | null;
                    mandates: { url: string };
                    name: string;
                    notes: string | null;
                    payment_conditions:
                        | "upon_receipt"
                        | "custom"
                        | "7_days"
                        | "15_days"
                        | "30_days"
                        | "30_days_end_of_month"
                        | "45_days"
                        | "45_days_end_of_month"
                        | "60_days";
                    phone: string;
                    pro_account_mandates: { url: string };
                    recipient: string;
                    reference: string | null;
                    updated_at: string;
                },
                CreateIndividualCustomerError,
                PennylaneClient,
            >;
            getCompanyCustomer: (
                id: string,
            ) => Effect<
                {
                    billing_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    billing_iban: string
                    | null;
                    billing_language: "fr_FR" | "en_GB" | "de_DE";
                    contacts: { url: string };
                    created_at: string;
                    delivery_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    emails: readonly string[];
                    external_reference: string;
                    id: number;
                    ledger_account: { id: number }
                    | null;
                    mandates: { url: string };
                    name: string;
                    notes: string | null;
                    payment_conditions:
                        | "upon_receipt"
                        | "custom"
                        | "7_days"
                        | "15_days"
                        | "30_days"
                        | "30_days_end_of_month"
                        | "45_days"
                        | "45_days_end_of_month"
                        | "60_days";
                    phone: string;
                    pro_account_mandates: { url: string };
                    recipient: string;
                    reference: string | null;
                    reg_no: string;
                    updated_at: string;
                    vat_number: string;
                },
                GetCompanyCustomerError,
                PennylaneClient,
            >;
            getCustomer: (
                id: string,
            ) => Effect<
                | {
                    billing_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    billing_iban: string
                    | null;
                    billing_language: "fr_FR" | "en_GB" | "de_DE";
                    contacts: { url: string };
                    created_at: string;
                    customer_type: "company";
                    delivery_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    emails: readonly string[];
                    external_reference: string;
                    id: number;
                    ledger_account: { id: number }
                    | null;
                    mandates: { url: string };
                    name: string;
                    notes: string | null;
                    payment_conditions:
                        | "upon_receipt"
                        | "custom"
                        | "7_days"
                        | "15_days"
                        | "30_days"
                        | "30_days_end_of_month"
                        | "45_days"
                        | "45_days_end_of_month"
                        | "60_days";
                    phone: string;
                    pro_account_mandates: { url: string };
                    recipient: string;
                    reference: string | null;
                    reg_no: string;
                    updated_at: string;
                    vat_number: string;
                }
                | {
                    billing_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    billing_iban: string
                    | null;
                    billing_language: "fr_FR" | "en_GB" | "de_DE";
                    contacts: { url: string };
                    created_at: string;
                    customer_type: "individual";
                    delivery_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    emails: readonly string[];
                    external_reference: string;
                    first_name: string;
                    id: number;
                    last_name: string;
                    ledger_account: { id: number }
                    | null;
                    mandates: { url: string };
                    name: string;
                    notes: string | null;
                    payment_conditions:
                        | "upon_receipt"
                        | "custom"
                        | "7_days"
                        | "15_days"
                        | "30_days"
                        | "30_days_end_of_month"
                        | "45_days"
                        | "45_days_end_of_month"
                        | "60_days";
                    phone: string;
                    pro_account_mandates: { url: string };
                    recipient: string;
                    reference: string | null;
                    updated_at: string;
                },
                GetCustomerError,
                PennylaneClient,
            >;
            getCustomerCategories: (
                customerId: string,
                params?: GetCustomerCategoriesQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        analytical_code: string
                        | null;
                        category_group: { id: number };
                        created_at: string;
                        id: number;
                        label: string;
                        updated_at: string;
                        weight: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerCategoriesError,
                PennylaneClient,
            >;
            getCustomerContacts: (
                customerId: string,
                params?: GetCustomerContactsQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        created_at: string;
                        email: string;
                        first_name: string;
                        id: number;
                        last_name: string;
                        mobile_number: string;
                        role: string;
                        telephone_number: string;
                        updated_at: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetCustomerContactsError,
                PennylaneClient,
            >;
            getCustomers: (
                params?: GetCustomersQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly (
                        | {
                            billing_address: {
                                address: string;
                                city: string;
                                country_alpha2: string;
                                postal_code: string;
                            };
                            billing_iban: string
                            | null;
                            billing_language: "fr_FR" | "en_GB" | "de_DE";
                            contacts: { url: string };
                            created_at: string;
                            customer_type: "company";
                            delivery_address: {
                                address: string;
                                city: string;
                                country_alpha2: string;
                                postal_code: string;
                            };
                            emails: readonly string[];
                            external_reference: string;
                            id: number;
                            ledger_account: { id: number }
                            | null;
                            mandates: { url: string };
                            name: string;
                            notes: string | null;
                            payment_conditions:
                                | "upon_receipt"
                                | "custom"
                                | "7_days"
                                | "15_days"
                                | "30_days"
                                | "30_days_end_of_month"
                                | "45_days"
                                | "45_days_end_of_month"
                                | "60_days";
                            phone: string;
                            pro_account_mandates: { url: string };
                            recipient: string;
                            reference: string | null;
                            reg_no: string;
                            updated_at: string;
                            vat_number: string;
                        }
                        | {
                            billing_address: {
                                address: string;
                                city: string;
                                country_alpha2: string;
                                postal_code: string;
                            };
                            billing_iban: string
                            | null;
                            billing_language: "fr_FR" | "en_GB" | "de_DE";
                            contacts: { url: string };
                            created_at: string;
                            customer_type: "individual";
                            delivery_address: {
                                address: string;
                                city: string;
                                country_alpha2: string;
                                postal_code: string;
                            };
                            emails: readonly string[];
                            external_reference: string;
                            first_name: string;
                            id: number;
                            last_name: string;
                            ledger_account: { id: number }
                            | null;
                            mandates: { url: string };
                            name: string;
                            notes: string | null;
                            payment_conditions:
                                | "upon_receipt"
                                | "custom"
                                | "7_days"
                                | "15_days"
                                | "30_days"
                                | "30_days_end_of_month"
                                | "45_days"
                                | "45_days_end_of_month"
                                | "60_days";
                            phone: string;
                            pro_account_mandates: { url: string };
                            recipient: string;
                            reference: string | null;
                            updated_at: string;
                        }
                    )[];
                    next_cursor?: string
                    | null;
                },
                GetCustomersError,
                PennylaneClient,
            >;
            getIndividualCustomer: (
                id: string,
            ) => Effect<
                {
                    billing_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    billing_iban: string
                    | null;
                    billing_language: "fr_FR" | "en_GB" | "de_DE";
                    contacts: { url: string };
                    created_at: string;
                    delivery_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    emails: readonly string[];
                    external_reference: string;
                    first_name: string;
                    id: number;
                    last_name: string;
                    ledger_account: { id: number }
                    | null;
                    mandates: { url: string };
                    name: string;
                    notes: string | null;
                    payment_conditions:
                        | "upon_receipt"
                        | "custom"
                        | "7_days"
                        | "15_days"
                        | "30_days"
                        | "30_days_end_of_month"
                        | "45_days"
                        | "45_days_end_of_month"
                        | "60_days";
                    phone: string;
                    pro_account_mandates: { url: string };
                    recipient: string;
                    reference: string | null;
                    updated_at: string;
                },
                GetIndividualCustomerError,
                PennylaneClient,
            >;
            updateCompanyCustomer: (
                id: string,
                body: UpdateCompanyCustomerBody,
            ) => Effect<
                {
                    billing_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    billing_iban: string
                    | null;
                    billing_language: "fr_FR" | "en_GB" | "de_DE";
                    contacts: { url: string };
                    created_at: string;
                    delivery_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    emails: readonly string[];
                    external_reference: string;
                    id: number;
                    ledger_account: { id: number }
                    | null;
                    mandates: { url: string };
                    name: string;
                    notes: string | null;
                    payment_conditions:
                        | "upon_receipt"
                        | "custom"
                        | "7_days"
                        | "15_days"
                        | "30_days"
                        | "30_days_end_of_month"
                        | "45_days"
                        | "45_days_end_of_month"
                        | "60_days";
                    phone: string;
                    pro_account_mandates: { url: string };
                    recipient: string;
                    reference: string | null;
                    reg_no: string;
                    updated_at: string;
                    vat_number: string;
                },
                UpdateCompanyCustomerError,
                PennylaneClient,
            >;
            updateIndividualCustomer: (
                id: string,
                body: UpdateIndividualCustomerBody,
            ) => Effect<
                {
                    billing_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    billing_iban: string
                    | null;
                    billing_language: "fr_FR" | "en_GB" | "de_DE";
                    contacts: { url: string };
                    created_at: string;
                    delivery_address: {
                        address: string;
                        city: string;
                        country_alpha2: string;
                        postal_code: string;
                    };
                    emails: readonly string[];
                    external_reference: string;
                    first_name: string;
                    id: number;
                    last_name: string;
                    ledger_account: { id: number }
                    | null;
                    mandates: { url: string };
                    name: string;
                    notes: string | null;
                    payment_conditions:
                        | "upon_receipt"
                        | "custom"
                        | "7_days"
                        | "15_days"
                        | "30_days"
                        | "30_days_end_of_month"
                        | "45_days"
                        | "45_days_end_of_month"
                        | "60_days";
                    phone: string;
                    pro_account_mandates: { url: string };
                    recipient: string;
                    reference: string | null;
                    updated_at: string;
                },
                UpdateIndividualCustomerError,
                PennylaneClient,
            >;
        };
        journals: {
            createJournal: (
                body: CreateJournalBody,
            ) => Effect<
                { code: string; id: number; label: string; type: string },
                CreateJournalError,
                PennylaneClient,
            >;
            getJournal: (
                id: number,
            ) => Effect<
                { code: string; id: number; label: string; type: string },
                GetJournalError,
                PennylaneClient,
            >;
            getJournals: (
                params?: GetJournalsQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        code: string;
                        id: number;
                        label: string;
                        type: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetJournalsError,
                PennylaneClient,
            >;
        };
        products: {
            createProduct: (
                body: CreateProductBody,
            ) => Effect<
                {
                    archived_at: string
                    | null;
                    created_at: string;
                    currency: string;
                    description: string;
                    external_reference: string;
                    id: number;
                    label: string;
                    ledger_account: { id: number } | null;
                    price: string;
                    price_before_tax: string;
                    reference: string | null;
                    unit: string;
                    updated_at: string;
                    vat_rate: string;
                },
                CreateProductError,
                PennylaneClient,
            >;
            getProduct: (
                id: number,
            ) => Effect<
                {
                    archived_at: string
                    | null;
                    created_at: string;
                    currency: string;
                    description: string;
                    external_reference: string;
                    id: number;
                    label: string;
                    ledger_account: { id: number } | null;
                    price: string;
                    price_before_tax: string;
                    reference: string | null;
                    unit: string;
                    updated_at: string;
                    vat_rate: string;
                },
                GetProductError,
                PennylaneClient,
            >;
            getProducts: (
                params?: GetProductsQueryParams,
            ) => Effect<
                {
                    has_more: boolean;
                    items: readonly {
                        archived_at: string
                        | null;
                        created_at: string;
                        currency: string;
                        description: string;
                        external_reference: string;
                        id: number;
                        label: string;
                        ledger_account: { id: number } | null;
                        price: string;
                        price_before_tax: string;
                        reference: string | null;
                        unit: string;
                        updated_at: string;
                        vat_rate: string;
                    }[];
                    next_cursor?: string
                    | null;
                },
                GetProductsError,
                PennylaneClient,
            >;
            updateProduct: (
                id: number,
                body: UpdateProductBody,
            ) => Effect<
                {
                    archived_at: string
                    | null;
                    created_at: string;
                    currency: string;
                    description: string;
                    external_reference: string;
                    id: number;
                    label: string;
                    ledger_account: { id: number } | null;
                    price: string;
                    price_before_tax: string;
                    reference: string | null;
                    unit: string;
                    updated_at: string;
                    vat_rate: string;
                },
                UpdateProductError,
                PennylaneClient,
            >;
        };
    } = ...

    The main API object grouped by resource.

    Type Declaration

    • customerInvoices: {
          categorizeCustomerInvoice: (
              customerInvoiceId: number,
              body: CategorizeCustomerInvoiceBody,
          ) => Effect<
              readonly {
                  analytical_code: string
                  | null;
                  category_group: { id: number };
                  created_at: string;
                  id: number;
                  label: string;
                  updated_at: string;
                  weight: string;
              }[],
              CategorizeCustomerInvoiceError,
              PennylaneClient,
          >;
          createCustomerInvoice: (
              body: CreateCustomerInvoiceBody,
          ) => Effect<
              {
                  amount: string;
                  appendices: { url: string };
                  archived_at: string | null;
                  billing_subscription: { id: number } | null;
                  categories: { url: string };
                  created_at: string;
                  credited_invoice: { id: number; url: string } | null;
                  currency: string;
                  currency_amount: string;
                  currency_amount_before_tax: string;
                  currency_tax: string;
                  custom_header_fields: { url: string };
                  customer: { id: number; url: string } | null;
                  customer_invoice_template: { id: number } | null;
                  date: string | null;
                  deadline: string | null;
                  discount: { type: "absolute" | "relative"; value: string };
                  draft: boolean;
                  e_invoicing:
                      | {
                          reason: string
                          | null;
                          status:
                              | "accepted"
                              | "approved"
                              | "collected"
                              | "in_dispute"
                              | "partially_collected"
                              | "refused"
                              | "rejected"
                              | "sent"
                              | "submitted";
                      }
                      | null;
                  exchange_rate: string;
                  external_reference: string;
                  filename: string
                  | null;
                  id: number;
                  invoice_line_sections: { url: string };
                  invoice_lines: { url: string };
                  invoice_number: string;
                  label: string | null;
                  language: "fr_FR" | "en_GB";
                  ledger_entry: { id: number };
                  matched_transactions: { url: string };
                  paid: boolean;
                  payments: { url: string };
                  pdf_description: string | null;
                  pdf_invoice_free_text: string;
                  pdf_invoice_subject: string;
                  public_file_url: string | null;
                  quote: { id: number } | null;
                  remaining_amount_with_tax: string | null;
                  remaining_amount_without_tax: string | null;
                  special_mention: string | null;
                  status:
                      | "paid"
                      | "archived"
                      | "incomplete"
                      | "cancelled"
                      | "partially_paid"
                      | "partially_cancelled"
                      | "upcoming"
                      | "late"
                      | "draft"
                      | "credit_note";
                  tax: string;
                  transaction_reference: | {
                      banking_provider: string;
                      provider_field_name: string;
                      provider_field_value: string;
                  }
                  | null;
                  updated_at: string;
              },
              CreateCustomerInvoiceError,
              PennylaneClient,
          >;
          createCustomerInvoiceFromQuote: (
              body: CreateCustomerInvoiceFromQuoteBody,
          ) => Effect<
              {
                  amount: string;
                  appendices: { url: string };
                  archived_at: string | null;
                  billing_subscription: { id: number } | null;
                  categories: { url: string };
                  created_at: string;
                  credited_invoice: { id: number; url: string } | null;
                  currency: string;
                  currency_amount: string;
                  currency_amount_before_tax: string;
                  currency_tax: string;
                  custom_header_fields: { url: string };
                  customer: { id: number; url: string } | null;
                  customer_invoice_template: { id: number } | null;
                  date: string | null;
                  deadline: string | null;
                  discount: { type: "absolute" | "relative"; value: string };
                  draft: boolean;
                  e_invoicing:
                      | {
                          reason: string
                          | null;
                          status:
                              | "accepted"
                              | "approved"
                              | "collected"
                              | "in_dispute"
                              | "partially_collected"
                              | "refused"
                              | "rejected"
                              | "sent"
                              | "submitted";
                      }
                      | null;
                  exchange_rate: string;
                  external_reference: string;
                  filename: string
                  | null;
                  id: number;
                  invoice_line_sections: { url: string };
                  invoice_lines: { url: string };
                  invoice_number: string;
                  label: string | null;
                  language: "fr_FR" | "en_GB";
                  ledger_entry: { id: number };
                  matched_transactions: { url: string };
                  paid: boolean;
                  payments: { url: string };
                  pdf_description: string | null;
                  pdf_invoice_free_text: string;
                  pdf_invoice_subject: string;
                  public_file_url: string | null;
                  quote: { id: number } | null;
                  remaining_amount_with_tax: string | null;
                  remaining_amount_without_tax: string | null;
                  special_mention: string | null;
                  status:
                      | "paid"
                      | "archived"
                      | "incomplete"
                      | "cancelled"
                      | "partially_paid"
                      | "partially_cancelled"
                      | "upcoming"
                      | "late"
                      | "draft"
                      | "credit_note";
                  tax: string;
                  transaction_reference: | {
                      banking_provider: string;
                      provider_field_name: string;
                      provider_field_value: string;
                  }
                  | null;
                  updated_at: string;
              },
              CreateCustomerInvoiceFromQuoteError,
              PennylaneClient,
          >;
          deleteCustomerInvoice: (
              invoiceId: number,
          ) => Effect<void, DeleteCustomerInvoiceError, PennylaneClient>;
          finalizeCustomerInvoice: (
              invoiceId: number,
          ) => Effect<
              {
                  amount: string;
                  appendices: { url: string };
                  archived_at: string | null;
                  billing_subscription: { id: number } | null;
                  categories: { url: string };
                  created_at: string;
                  credited_invoice: { id: number; url: string } | null;
                  currency: string;
                  currency_amount: string;
                  currency_amount_before_tax: string;
                  currency_tax: string;
                  custom_header_fields: { url: string };
                  customer: { id: number; url: string } | null;
                  customer_invoice_template: { id: number } | null;
                  date: string | null;
                  deadline: string | null;
                  discount: { type: "absolute" | "relative"; value: string };
                  draft: boolean;
                  e_invoicing:
                      | {
                          reason: string
                          | null;
                          status:
                              | "accepted"
                              | "approved"
                              | "collected"
                              | "in_dispute"
                              | "partially_collected"
                              | "refused"
                              | "rejected"
                              | "sent"
                              | "submitted";
                      }
                      | null;
                  exchange_rate: string;
                  external_reference: string;
                  filename: string
                  | null;
                  id: number;
                  invoice_line_sections: { url: string };
                  invoice_lines: { url: string };
                  invoice_number: string;
                  label: string | null;
                  language: "fr_FR" | "en_GB";
                  ledger_entry: { id: number };
                  matched_transactions: { url: string };
                  paid: boolean;
                  payments: { url: string };
                  pdf_description: string | null;
                  pdf_invoice_free_text: string;
                  pdf_invoice_subject: string;
                  public_file_url: string | null;
                  quote: { id: number } | null;
                  remaining_amount_with_tax: string | null;
                  remaining_amount_without_tax: string | null;
                  special_mention: string | null;
                  status:
                      | "paid"
                      | "archived"
                      | "incomplete"
                      | "cancelled"
                      | "partially_paid"
                      | "partially_cancelled"
                      | "upcoming"
                      | "late"
                      | "draft"
                      | "credit_note";
                  tax: string;
                  transaction_reference: | {
                      banking_provider: string;
                      provider_field_name: string;
                      provider_field_value: string;
                  }
                  | null;
                  updated_at: string;
              },
              FinalizeCustomerInvoiceError,
              PennylaneClient,
          >;
          getCustomerInvoice: (
              customerInvoiceId: number,
          ) => Effect<
              {
                  amount: string;
                  appendices: { url: string };
                  archived_at: string | null;
                  billing_subscription: { id: number } | null;
                  categories: { url: string };
                  created_at: string;
                  credited_invoice: { id: number; url: string } | null;
                  currency: string;
                  currency_amount: string;
                  currency_amount_before_tax: string;
                  currency_tax: string;
                  custom_header_fields: { url: string };
                  customer: { id: number; url: string } | null;
                  customer_invoice_template: { id: number } | null;
                  date: string | null;
                  deadline: string | null;
                  discount: { type: "absolute" | "relative"; value: string };
                  draft: boolean;
                  e_invoicing:
                      | {
                          reason: string
                          | null;
                          status:
                              | "accepted"
                              | "approved"
                              | "collected"
                              | "in_dispute"
                              | "partially_collected"
                              | "refused"
                              | "rejected"
                              | "sent"
                              | "submitted";
                      }
                      | null;
                  exchange_rate: string;
                  external_reference: string;
                  filename: string
                  | null;
                  id: number;
                  invoice_line_sections: { url: string };
                  invoice_lines: { url: string };
                  invoice_number: string;
                  label: string | null;
                  language: "fr_FR" | "en_GB";
                  ledger_entry: { id: number };
                  matched_transactions: { url: string };
                  paid: boolean;
                  payments: { url: string };
                  pdf_description: string | null;
                  pdf_invoice_free_text: string;
                  pdf_invoice_subject: string;
                  public_file_url: string | null;
                  quote: { id: number } | null;
                  remaining_amount_with_tax: string | null;
                  remaining_amount_without_tax: string | null;
                  special_mention: string | null;
                  status:
                      | "paid"
                      | "archived"
                      | "incomplete"
                      | "cancelled"
                      | "partially_paid"
                      | "partially_cancelled"
                      | "upcoming"
                      | "late"
                      | "draft"
                      | "credit_note";
                  tax: string;
                  transaction_reference: | {
                      banking_provider: string;
                      provider_field_name: string;
                      provider_field_value: string;
                  }
                  | null;
                  updated_at: string;
              },
              GetCustomerInvoiceError,
              PennylaneClient,
          >;
          getCustomerInvoiceAppendices: (
              customerInvoiceId: number,
              params?: GetCustomerInvoiceAppendicesQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      created_at: string;
                      filename: string;
                      id: number;
                      updated_at: string;
                      url: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerInvoiceAppendicesError,
              PennylaneClient,
          >;
          getCustomerInvoiceCategories: (
              customerInvoiceId: number,
              params?: GetCustomerInvoiceCategoriesQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      analytical_code: string
                      | null;
                      category_group: { id: number };
                      created_at: string;
                      id: number;
                      label: string;
                      updated_at: string;
                      weight: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerInvoiceCategoriesError,
              PennylaneClient,
          >;
          getCustomerInvoiceCustomHeaderFields: (
              customerInvoiceId: number,
              params?: GetCustomerInvoiceCustomHeaderFieldsQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      created_at: string;
                      id: number;
                      rank: number;
                      title: string;
                      updated_at: string;
                      value: string
                      | null;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerInvoiceCustomHeaderFieldsError,
              PennylaneClient,
          >;
          getCustomerInvoiceInvoiceLines: (
              customerInvoiceId: number,
              params?: GetCustomerInvoiceInvoiceLinesQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      amount: string;
                      created_at: string;
                      currency_amount: string;
                      currency_amount_before_tax: string;
                      currency_tax: string;
                      description: string;
                      discount: { type: "absolute"
                      | "relative"; value: string };
                      id: number;
                      imputation_dates: { end_date: string; start_date: string } | null;
                      label: string;
                      product: { id: number; url: string } | null;
                      quantity: string;
                      raw_currency_unit_price: string;
                      section_rank: number | null;
                      tax: string;
                      unit: string | null;
                      updated_at: string;
                      vat_rate: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerInvoiceInvoiceLinesError,
              PennylaneClient,
          >;
          getCustomerInvoiceInvoiceLineSections: (
              customerInvoiceId: number,
              params?: GetCustomerInvoiceInvoiceLineSectionsQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      created_at: string;
                      description: string
                      | null;
                      id: number;
                      rank: number;
                      title: string | null;
                      updated_at: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerInvoiceInvoiceLineSectionsError,
              PennylaneClient,
          >;
          getCustomerInvoiceMatchedTransactions: (
              customerInvoiceId: number,
              params?: GetCustomerInvoiceMatchedTransactionsQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      amount: string;
                      archived_at: string
                      | null;
                      attachment_required: boolean;
                      bank_account: { id: number; url: string };
                      categories: readonly {
                          analytical_code: string | null;
                          category_group: { id: number };
                          created_at: string;
                          id: number;
                          label: string;
                          updated_at: string;
                          weight: string;
                      }[];
                      created_at: string;
                      currency: string
                      | null;
                      currency_amount: string;
                      currency_fee: string | null;
                      customer: { id: number; url: string } | null;
                      date: string;
                      fee: string | null;
                      id: number;
                      journal: { id: number };
                      label: string | null;
                      outstanding_balance: string | null;
                      pro_account_expense:
                          | {
                              card_masked_number: string;
                              employee: { first_name: ...; id: ...; last_name: ... }
                              | null;
                          }
                          | null;
                      updated_at: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerInvoiceMatchedTransactionsError,
              PennylaneClient,
          >;
          getCustomerInvoicePayments: (
              customerInvoiceId: number,
              params?: GetCustomerInvoicePaymentsQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      created_at: string;
                      currency: string
                      | null;
                      currency_amount: string;
                      id: number;
                      label: string;
                      status:
                          | "error"
                          | "submitted"
                          | "cancelled"
                          | "initiated"
                          | "pending"
                          | "emitted"
                          | "found"
                          | "not_found"
                          | "aborted"
                          | "refunded"
                          | "prepared"
                          | "pending_customer_approval"
                          | "pending_submission"
                          | "confirmed"
                          | "paid_out"
                          | "customer_approval_denied"
                          | "failed"
                          | "charged_back"
                          | "resubmission_requested";
                      updated_at: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerInvoicePaymentsError,
              PennylaneClient,
          >;
          getCustomerInvoices: (
              params?: GetCustomerInvoicesQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      amount: string;
                      appendices: { url: string };
                      archived_at: string | null;
                      billing_subscription: { id: number } | null;
                      categories: { url: string };
                      created_at: string;
                      credited_invoice: { id: number; url: string } | null;
                      currency: string;
                      currency_amount: string;
                      currency_amount_before_tax: string;
                      currency_tax: string;
                      custom_header_fields: { url: string };
                      customer: { id: number; url: string } | null;
                      customer_invoice_template: { id: number } | null;
                      date: string | null;
                      deadline: string | null;
                      discount: { type: "absolute" | "relative"; value: string };
                      draft: boolean;
                      e_invoicing:
                          | {
                              reason: string
                              | null;
                              status:
                                  | "accepted"
                                  | "approved"
                                  | "collected"
                                  | "in_dispute"
                                  | "partially_collected"
                                  | "refused"
                                  | "rejected"
                                  | "sent"
                                  | "submitted";
                          }
                          | null;
                      exchange_rate: string;
                      external_reference: string;
                      filename: string
                      | null;
                      id: number;
                      invoice_line_sections: { url: string };
                      invoice_lines: { url: string };
                      invoice_number: string;
                      label: string | null;
                      language: "fr_FR" | "en_GB";
                      ledger_entry: { id: number };
                      matched_transactions: { url: string };
                      paid: boolean;
                      payments: { url: string };
                      pdf_description: string | null;
                      pdf_invoice_free_text: string;
                      pdf_invoice_subject: string;
                      public_file_url: string | null;
                      quote: { id: number } | null;
                      remaining_amount_with_tax: string | null;
                      remaining_amount_without_tax: string | null;
                      special_mention: string | null;
                      status:
                          | "paid"
                          | "archived"
                          | "incomplete"
                          | "cancelled"
                          | "partially_paid"
                          | "partially_cancelled"
                          | "upcoming"
                          | "late"
                          | "draft"
                          | "credit_note";
                      tax: string;
                      transaction_reference: | {
                          banking_provider: string;
                          provider_field_name: string;
                          provider_field_value: string;
                      }
                      | null;
                      updated_at: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerInvoicesError,
              PennylaneClient,
          >;
          importCustomerInvoice: (
              body: ImportCustomerInvoiceBody,
          ) => Effect<
              {
                  amount: string;
                  appendices: { url: string };
                  archived_at: string | null;
                  billing_subscription: { id: number } | null;
                  categories: { url: string };
                  created_at: string;
                  credited_invoice: { id: number; url: string } | null;
                  currency: string;
                  currency_amount: string;
                  currency_amount_before_tax: string;
                  currency_tax: string;
                  custom_header_fields: { url: string };
                  customer: { id: number; url: string } | null;
                  customer_invoice_template: { id: number } | null;
                  date: string | null;
                  deadline: string | null;
                  discount: { type: "absolute" | "relative"; value: string };
                  draft: boolean;
                  e_invoicing:
                      | {
                          reason: string
                          | null;
                          status:
                              | "accepted"
                              | "approved"
                              | "collected"
                              | "in_dispute"
                              | "partially_collected"
                              | "refused"
                              | "rejected"
                              | "sent"
                              | "submitted";
                      }
                      | null;
                  exchange_rate: string;
                  external_reference: string;
                  filename: string
                  | null;
                  id: number;
                  invoice_line_sections: { url: string };
                  invoice_lines: { url: string };
                  invoice_number: string;
                  label: string | null;
                  language: "fr_FR" | "en_GB";
                  ledger_entry: { id: number };
                  matched_transactions: { url: string };
                  paid: boolean;
                  payments: { url: string };
                  pdf_description: string | null;
                  pdf_invoice_free_text: string;
                  pdf_invoice_subject: string;
                  public_file_url: string | null;
                  quote: { id: number } | null;
                  remaining_amount_with_tax: string | null;
                  remaining_amount_without_tax: string | null;
                  special_mention: string | null;
                  status:
                      | "paid"
                      | "archived"
                      | "incomplete"
                      | "cancelled"
                      | "partially_paid"
                      | "partially_cancelled"
                      | "upcoming"
                      | "late"
                      | "draft"
                      | "credit_note";
                  tax: string;
                  transaction_reference: | {
                      banking_provider: string;
                      provider_field_name: string;
                      provider_field_value: string;
                  }
                  | null;
                  updated_at: string;
              },
              ImportCustomerInvoiceError,
              PennylaneClient,
          >;
          linkCreditNote: (
              customerInvoiceId: number,
              body: LinkCreditNoteBody,
          ) => Effect<
              {
                  amount: string;
                  appendices: { url: string };
                  archived_at: string | null;
                  billing_subscription: { id: number } | null;
                  categories: { url: string };
                  created_at: string;
                  credited_invoice: { id: number; url: string } | null;
                  currency: string;
                  currency_amount: string;
                  currency_amount_before_tax: string;
                  currency_tax: string;
                  custom_header_fields: { url: string };
                  customer: { id: number; url: string } | null;
                  customer_invoice_template: { id: number } | null;
                  date: string | null;
                  deadline: string | null;
                  discount: { type: "absolute" | "relative"; value: string };
                  draft: boolean;
                  e_invoicing:
                      | {
                          reason: string
                          | null;
                          status:
                              | "accepted"
                              | "approved"
                              | "collected"
                              | "in_dispute"
                              | "partially_collected"
                              | "refused"
                              | "rejected"
                              | "sent"
                              | "submitted";
                      }
                      | null;
                  exchange_rate: string;
                  external_reference: string;
                  filename: string
                  | null;
                  id: number;
                  invoice_line_sections: { url: string };
                  invoice_lines: { url: string };
                  invoice_number: string;
                  label: string | null;
                  language: "fr_FR" | "en_GB";
                  ledger_entry: { id: number };
                  matched_transactions: { url: string };
                  paid: boolean;
                  payments: { url: string };
                  pdf_description: string | null;
                  pdf_invoice_free_text: string;
                  pdf_invoice_subject: string;
                  public_file_url: string | null;
                  quote: { id: number } | null;
                  remaining_amount_with_tax: string | null;
                  remaining_amount_without_tax: string | null;
                  special_mention: string | null;
                  status:
                      | "paid"
                      | "archived"
                      | "incomplete"
                      | "cancelled"
                      | "partially_paid"
                      | "partially_cancelled"
                      | "upcoming"
                      | "late"
                      | "draft"
                      | "credit_note";
                  tax: string;
                  transaction_reference: | {
                      banking_provider: string;
                      provider_field_name: string;
                      provider_field_value: string;
                  }
                  | null;
                  updated_at: string;
              },
              LinkCreditNoteError,
              PennylaneClient,
          >;
          markAsPaid: (
              invoiceId: number,
          ) => Effect<void, MarkCustomerInvoiceAsPaidError, PennylaneClient>;
          sendCustomerInvoiceByEmail: (
              customerInvoiceId: number,
              body?: SendCustomerInvoiceByEmailBody,
          ) => Effect<void, SendCustomerInvoiceByEmailError, PennylaneClient>;
          updateCustomerInvoice: (
              invoiceId: number,
              body: UpdateCustomerInvoiceBody,
          ) => Effect<
              {
                  amount: string;
                  appendices: { url: string };
                  archived_at: string | null;
                  billing_subscription: { id: number } | null;
                  categories: { url: string };
                  created_at: string;
                  credited_invoice: { id: number; url: string } | null;
                  currency: string;
                  currency_amount: string;
                  currency_amount_before_tax: string;
                  currency_tax: string;
                  custom_header_fields: { url: string };
                  customer: { id: number; url: string } | null;
                  customer_invoice_template: { id: number } | null;
                  date: string | null;
                  deadline: string | null;
                  discount: { type: "absolute" | "relative"; value: string };
                  draft: boolean;
                  e_invoicing:
                      | {
                          reason: string
                          | null;
                          status:
                              | "accepted"
                              | "approved"
                              | "collected"
                              | "in_dispute"
                              | "partially_collected"
                              | "refused"
                              | "rejected"
                              | "sent"
                              | "submitted";
                      }
                      | null;
                  exchange_rate: string;
                  external_reference: string;
                  filename: string
                  | null;
                  id: number;
                  invoice_line_sections: { url: string };
                  invoice_lines: { url: string };
                  invoice_number: string;
                  label: string | null;
                  language: "fr_FR" | "en_GB";
                  ledger_entry: { id: number };
                  matched_transactions: { url: string };
                  paid: boolean;
                  payments: { url: string };
                  pdf_description: string | null;
                  pdf_invoice_free_text: string;
                  pdf_invoice_subject: string;
                  public_file_url: string | null;
                  quote: { id: number } | null;
                  remaining_amount_with_tax: string | null;
                  remaining_amount_without_tax: string | null;
                  special_mention: string | null;
                  status:
                      | "paid"
                      | "archived"
                      | "incomplete"
                      | "cancelled"
                      | "partially_paid"
                      | "partially_cancelled"
                      | "upcoming"
                      | "late"
                      | "draft"
                      | "credit_note";
                  tax: string;
                  transaction_reference: | {
                      banking_provider: string;
                      provider_field_name: string;
                      provider_field_value: string;
                  }
                  | null;
                  updated_at: string;
              },
              UpdateCustomerInvoiceError,
              PennylaneClient,
          >;
          updateImportedCustomerInvoice: (
              invoiceId: number,
              body: UpdateImportedCustomerInvoiceBody,
          ) => Effect<
              {
                  amount: string;
                  appendices: { url: string };
                  archived_at: string | null;
                  billing_subscription: { id: number } | null;
                  categories: { url: string };
                  created_at: string;
                  credited_invoice: { id: number; url: string } | null;
                  currency: string;
                  currency_amount: string;
                  currency_amount_before_tax: string;
                  currency_tax: string;
                  custom_header_fields: { url: string };
                  customer: { id: number; url: string } | null;
                  customer_invoice_template: { id: number } | null;
                  date: string | null;
                  deadline: string | null;
                  discount: { type: "absolute" | "relative"; value: string };
                  draft: boolean;
                  e_invoicing:
                      | {
                          reason: string
                          | null;
                          status:
                              | "accepted"
                              | "approved"
                              | "collected"
                              | "in_dispute"
                              | "partially_collected"
                              | "refused"
                              | "rejected"
                              | "sent"
                              | "submitted";
                      }
                      | null;
                  exchange_rate: string;
                  external_reference: string;
                  filename: string
                  | null;
                  id: number;
                  invoice_line_sections: { url: string };
                  invoice_lines: { url: string };
                  invoice_number: string;
                  label: string | null;
                  language: "fr_FR" | "en_GB";
                  ledger_entry: { id: number };
                  matched_transactions: { url: string };
                  paid: boolean;
                  payments: { url: string };
                  pdf_description: string | null;
                  pdf_invoice_free_text: string;
                  pdf_invoice_subject: string;
                  public_file_url: string | null;
                  quote: { id: number } | null;
                  remaining_amount_with_tax: string | null;
                  remaining_amount_without_tax: string | null;
                  special_mention: string | null;
                  status:
                      | "paid"
                      | "archived"
                      | "incomplete"
                      | "cancelled"
                      | "partially_paid"
                      | "partially_cancelled"
                      | "upcoming"
                      | "late"
                      | "draft"
                      | "credit_note";
                  tax: string;
                  transaction_reference: | {
                      banking_provider: string;
                      provider_field_name: string;
                      provider_field_value: string;
                  }
                  | null;
                  updated_at: string;
              },
              UpdateImportedCustomerInvoiceError,
              PennylaneClient,
          >;
          uploadCustomerInvoiceAppendix: (
              customerInvoiceId: number,
              body: UploadCustomerInvoiceAppendixBody,
          ) => Effect<
              {
                  created_at: string;
                  filename: string;
                  id: number;
                  updated_at: string;
                  url: string;
              },
              UploadCustomerInvoiceAppendixError,
              PennylaneClient,
          >;
      }
      • categorizeCustomerInvoice: (
            customerInvoiceId: number,
            body: CategorizeCustomerInvoiceBody,
        ) => Effect<
            readonly {
                analytical_code: string
                | null;
                category_group: { id: number };
                created_at: string;
                id: number;
                label: string;
                updated_at: string;
                weight: string;
            }[],
            CategorizeCustomerInvoiceError,
            PennylaneClient,
        >

        Categorizes a customer invoice.

        This endpoint is not applicable for draft invoices.

        Possible errors:

        • CategorizeCustomerInvoiceBadRequest (400): Missing or invalid request parameters
        • CategorizeCustomerInvoiceUnauthorized (401): Invalid or missing API key
        • CategorizeCustomerInvoiceForbidden (403): Insufficient permissions for this operation
        • CategorizeCustomerInvoiceNotFound (404): Invoice not found
        • CategorizeCustomerInvoiceUnprocessableEntity (422): Request rejected by business validation
      • createCustomerInvoice: (
            body: CreateCustomerInvoiceBody,
        ) => Effect<
            {
                amount: string;
                appendices: { url: string };
                archived_at: string | null;
                billing_subscription: { id: number } | null;
                categories: { url: string };
                created_at: string;
                credited_invoice: { id: number; url: string } | null;
                currency: string;
                currency_amount: string;
                currency_amount_before_tax: string;
                currency_tax: string;
                custom_header_fields: { url: string };
                customer: { id: number; url: string } | null;
                customer_invoice_template: { id: number } | null;
                date: string | null;
                deadline: string | null;
                discount: { type: "absolute" | "relative"; value: string };
                draft: boolean;
                e_invoicing:
                    | {
                        reason: string
                        | null;
                        status:
                            | "accepted"
                            | "approved"
                            | "collected"
                            | "in_dispute"
                            | "partially_collected"
                            | "refused"
                            | "rejected"
                            | "sent"
                            | "submitted";
                    }
                    | null;
                exchange_rate: string;
                external_reference: string;
                filename: string
                | null;
                id: number;
                invoice_line_sections: { url: string };
                invoice_lines: { url: string };
                invoice_number: string;
                label: string | null;
                language: "fr_FR" | "en_GB";
                ledger_entry: { id: number };
                matched_transactions: { url: string };
                paid: boolean;
                payments: { url: string };
                pdf_description: string | null;
                pdf_invoice_free_text: string;
                pdf_invoice_subject: string;
                public_file_url: string | null;
                quote: { id: number } | null;
                remaining_amount_with_tax: string | null;
                remaining_amount_without_tax: string | null;
                special_mention: string | null;
                status:
                    | "paid"
                    | "archived"
                    | "incomplete"
                    | "cancelled"
                    | "partially_paid"
                    | "partially_cancelled"
                    | "upcoming"
                    | "late"
                    | "draft"
                    | "credit_note";
                tax: string;
                transaction_reference: | {
                    banking_provider: string;
                    provider_field_name: string;
                    provider_field_value: string;
                }
                | null;
                updated_at: string;
            },
            CreateCustomerInvoiceError,
            PennylaneClient,
        >

        Creates a draft or finalized customer invoice (or credit note).

        Possible errors:

        • CreateCustomerInvoiceBadRequest (400): Missing or invalid request body
        • CreateCustomerInvoiceUnauthorized (401): Invalid or missing API key
        • CreateCustomerInvoiceForbidden (403): Insufficient permissions for this operation
        • CreateCustomerInvoiceNotFound (404): Related resource not found
        • CreateCustomerInvoiceUnprocessableEntity (422): Request rejected by business validation
      • createCustomerInvoiceFromQuote: (
            body: CreateCustomerInvoiceFromQuoteBody,
        ) => Effect<
            {
                amount: string;
                appendices: { url: string };
                archived_at: string | null;
                billing_subscription: { id: number } | null;
                categories: { url: string };
                created_at: string;
                credited_invoice: { id: number; url: string } | null;
                currency: string;
                currency_amount: string;
                currency_amount_before_tax: string;
                currency_tax: string;
                custom_header_fields: { url: string };
                customer: { id: number; url: string } | null;
                customer_invoice_template: { id: number } | null;
                date: string | null;
                deadline: string | null;
                discount: { type: "absolute" | "relative"; value: string };
                draft: boolean;
                e_invoicing:
                    | {
                        reason: string
                        | null;
                        status:
                            | "accepted"
                            | "approved"
                            | "collected"
                            | "in_dispute"
                            | "partially_collected"
                            | "refused"
                            | "rejected"
                            | "sent"
                            | "submitted";
                    }
                    | null;
                exchange_rate: string;
                external_reference: string;
                filename: string
                | null;
                id: number;
                invoice_line_sections: { url: string };
                invoice_lines: { url: string };
                invoice_number: string;
                label: string | null;
                language: "fr_FR" | "en_GB";
                ledger_entry: { id: number };
                matched_transactions: { url: string };
                paid: boolean;
                payments: { url: string };
                pdf_description: string | null;
                pdf_invoice_free_text: string;
                pdf_invoice_subject: string;
                public_file_url: string | null;
                quote: { id: number } | null;
                remaining_amount_with_tax: string | null;
                remaining_amount_without_tax: string | null;
                special_mention: string | null;
                status:
                    | "paid"
                    | "archived"
                    | "incomplete"
                    | "cancelled"
                    | "partially_paid"
                    | "partially_cancelled"
                    | "upcoming"
                    | "late"
                    | "draft"
                    | "credit_note";
                tax: string;
                transaction_reference: | {
                    banking_provider: string;
                    provider_field_name: string;
                    provider_field_value: string;
                }
                | null;
                updated_at: string;
            },
            CreateCustomerInvoiceFromQuoteError,
            PennylaneClient,
        >

        Creates a customer invoice from an existing quote.

        The invoice will inherit the quote's data (customer, lines, etc.).

        Possible errors:

        • CreateCustomerInvoiceFromQuoteBadRequest (400): Missing or invalid request parameters
        • CreateCustomerInvoiceFromQuoteUnauthorized (401): Invalid or missing API key
        • CreateCustomerInvoiceFromQuoteForbidden (403): Insufficient permissions for this operation
        • CreateCustomerInvoiceFromQuoteNotFound (404): Quote not found
        • CreateCustomerInvoiceFromQuoteUnprocessableEntity (422): Request rejected by business validation
      • deleteCustomerInvoice: (invoiceId: number) => Effect<void, DeleteCustomerInvoiceError, PennylaneClient>

        Deletes a draft customer invoice or draft credit note.

        Possible errors:

        • DeleteCustomerInvoiceBadRequest (400): Bad request
        • DeleteCustomerInvoiceUnauthorized (401): Invalid or missing API key
        • DeleteCustomerInvoiceForbidden (403): Insufficient permissions
        • DeleteCustomerInvoiceNotFound (404): Resource not found
        • DeleteCustomerInvoiceUnprocessableEntity (422): Unprocessable content
      • finalizeCustomerInvoice: (
            invoiceId: number,
        ) => Effect<
            {
                amount: string;
                appendices: { url: string };
                archived_at: string | null;
                billing_subscription: { id: number } | null;
                categories: { url: string };
                created_at: string;
                credited_invoice: { id: number; url: string } | null;
                currency: string;
                currency_amount: string;
                currency_amount_before_tax: string;
                currency_tax: string;
                custom_header_fields: { url: string };
                customer: { id: number; url: string } | null;
                customer_invoice_template: { id: number } | null;
                date: string | null;
                deadline: string | null;
                discount: { type: "absolute" | "relative"; value: string };
                draft: boolean;
                e_invoicing:
                    | {
                        reason: string
                        | null;
                        status:
                            | "accepted"
                            | "approved"
                            | "collected"
                            | "in_dispute"
                            | "partially_collected"
                            | "refused"
                            | "rejected"
                            | "sent"
                            | "submitted";
                    }
                    | null;
                exchange_rate: string;
                external_reference: string;
                filename: string
                | null;
                id: number;
                invoice_line_sections: { url: string };
                invoice_lines: { url: string };
                invoice_number: string;
                label: string | null;
                language: "fr_FR" | "en_GB";
                ledger_entry: { id: number };
                matched_transactions: { url: string };
                paid: boolean;
                payments: { url: string };
                pdf_description: string | null;
                pdf_invoice_free_text: string;
                pdf_invoice_subject: string;
                public_file_url: string | null;
                quote: { id: number } | null;
                remaining_amount_with_tax: string | null;
                remaining_amount_without_tax: string | null;
                special_mention: string | null;
                status:
                    | "paid"
                    | "archived"
                    | "incomplete"
                    | "cancelled"
                    | "partially_paid"
                    | "partially_cancelled"
                    | "upcoming"
                    | "late"
                    | "draft"
                    | "credit_note";
                tax: string;
                transaction_reference: | {
                    banking_provider: string;
                    provider_field_name: string;
                    provider_field_value: string;
                }
                | null;
                updated_at: string;
            },
            FinalizeCustomerInvoiceError,
            PennylaneClient,
        >

        Turns a draft customer invoice or credit note into a finalized one.

        Once finalized, the resource can no longer be edited.

        Possible errors:

        • FinalizeCustomerInvoiceBadRequest (400): Missing or invalid request parameters
        • FinalizeCustomerInvoiceUnauthorized (401): Invalid or missing API key
        • FinalizeCustomerInvoiceForbidden (403): Insufficient permissions for this operation
        • FinalizeCustomerInvoiceNotFound (404): Invoice not found
        • FinalizeCustomerInvoiceUnprocessableEntity (422): Request rejected by business validation
      • getCustomerInvoice: (
            customerInvoiceId: number,
        ) => Effect<
            {
                amount: string;
                appendices: { url: string };
                archived_at: string | null;
                billing_subscription: { id: number } | null;
                categories: { url: string };
                created_at: string;
                credited_invoice: { id: number; url: string } | null;
                currency: string;
                currency_amount: string;
                currency_amount_before_tax: string;
                currency_tax: string;
                custom_header_fields: { url: string };
                customer: { id: number; url: string } | null;
                customer_invoice_template: { id: number } | null;
                date: string | null;
                deadline: string | null;
                discount: { type: "absolute" | "relative"; value: string };
                draft: boolean;
                e_invoicing:
                    | {
                        reason: string
                        | null;
                        status:
                            | "accepted"
                            | "approved"
                            | "collected"
                            | "in_dispute"
                            | "partially_collected"
                            | "refused"
                            | "rejected"
                            | "sent"
                            | "submitted";
                    }
                    | null;
                exchange_rate: string;
                external_reference: string;
                filename: string
                | null;
                id: number;
                invoice_line_sections: { url: string };
                invoice_lines: { url: string };
                invoice_number: string;
                label: string | null;
                language: "fr_FR" | "en_GB";
                ledger_entry: { id: number };
                matched_transactions: { url: string };
                paid: boolean;
                payments: { url: string };
                pdf_description: string | null;
                pdf_invoice_free_text: string;
                pdf_invoice_subject: string;
                public_file_url: string | null;
                quote: { id: number } | null;
                remaining_amount_with_tax: string | null;
                remaining_amount_without_tax: string | null;
                special_mention: string | null;
                status:
                    | "paid"
                    | "archived"
                    | "incomplete"
                    | "cancelled"
                    | "partially_paid"
                    | "partially_cancelled"
                    | "upcoming"
                    | "late"
                    | "draft"
                    | "credit_note";
                tax: string;
                transaction_reference: | {
                    banking_provider: string;
                    provider_field_name: string;
                    provider_field_value: string;
                }
                | null;
                updated_at: string;
            },
            GetCustomerInvoiceError,
            PennylaneClient,
        >

        Retrieves a single customer invoice or credit note by ID.

        Possible errors:

        • GetCustomerInvoiceBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoiceUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoiceForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoiceNotFound (404): Invoice not found
      • getCustomerInvoiceAppendices: (
            customerInvoiceId: number,
            params?: GetCustomerInvoiceAppendicesQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    created_at: string;
                    filename: string;
                    id: number;
                    updated_at: string;
                    url: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerInvoiceAppendicesError,
            PennylaneClient,
        >

        Retrieves a list of appendices for a specific customer invoice.

        Uses cursor-based pagination.

        Possible errors:

        • GetCustomerInvoiceAppendicesBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoiceAppendicesUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoiceAppendicesForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoiceAppendicesNotFound (404): Invoice not found
      • getCustomerInvoiceCategories: (
            customerInvoiceId: number,
            params?: GetCustomerInvoiceCategoriesQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    analytical_code: string
                    | null;
                    category_group: { id: number };
                    created_at: string;
                    id: number;
                    label: string;
                    updated_at: string;
                    weight: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerInvoiceCategoriesError,
            PennylaneClient,
        >

        Retrieves a list of categories for a specific customer invoice.

        Uses cursor-based pagination.

        Possible errors:

        • GetCustomerInvoiceCategoriesBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoiceCategoriesUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoiceCategoriesForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoiceCategoriesNotFound (404): Invoice not found
      • getCustomerInvoiceCustomHeaderFields: (
            customerInvoiceId: number,
            params?: GetCustomerInvoiceCustomHeaderFieldsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    created_at: string;
                    id: number;
                    rank: number;
                    title: string;
                    updated_at: string;
                    value: string
                    | null;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerInvoiceCustomHeaderFieldsError,
            PennylaneClient,
        >

        Lists custom header fields for a customer invoice.

        Possible errors:

        • GetCustomerInvoiceCustomHeaderFieldsBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoiceCustomHeaderFieldsUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoiceCustomHeaderFieldsForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoiceCustomHeaderFieldsNotFound (404): Invoice not found
      • getCustomerInvoiceInvoiceLines: (
            customerInvoiceId: number,
            params?: GetCustomerInvoiceInvoiceLinesQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    amount: string;
                    created_at: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    description: string;
                    discount: { type: "absolute"
                    | "relative"; value: string };
                    id: number;
                    imputation_dates: { end_date: string; start_date: string } | null;
                    label: string;
                    product: { id: number; url: string } | null;
                    quantity: string;
                    raw_currency_unit_price: string;
                    section_rank: number | null;
                    tax: string;
                    unit: string | null;
                    updated_at: string;
                    vat_rate: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerInvoiceInvoiceLinesError,
            PennylaneClient,
        >

        Retrieves a list of invoice lines for a specific customer invoice.

        Uses cursor-based pagination.

        Possible errors:

        • GetCustomerInvoiceInvoiceLinesBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoiceInvoiceLinesUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoiceInvoiceLinesForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoiceInvoiceLinesNotFound (404): Invoice not found
      • getCustomerInvoiceInvoiceLineSections: (
            customerInvoiceId: number,
            params?: GetCustomerInvoiceInvoiceLineSectionsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    created_at: string;
                    description: string
                    | null;
                    id: number;
                    rank: number;
                    title: string | null;
                    updated_at: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerInvoiceInvoiceLineSectionsError,
            PennylaneClient,
        >

        Retrieves a list of invoice line sections for a specific customer invoice.

        Uses cursor-based pagination.

        Possible errors:

        • GetCustomerInvoiceInvoiceLineSectionsBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoiceInvoiceLineSectionsUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoiceInvoiceLineSectionsForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoiceInvoiceLineSectionsNotFound (404): Invoice not found
        // Get first page of invoice line sections
        yield* CustomerInvoicesApi.getCustomerInvoiceInvoiceLineSections(1234, { limit: 20 })

        // Get next page using cursor
        yield* CustomerInvoicesApi.getCustomerInvoiceInvoiceLineSections(1234, {
        cursor: "MjAyNS0wMS0wOVQwODoyNDozOC44MTI0NTha"
        })

        // Sort by ID in descending order
        yield* CustomerInvoicesApi.getCustomerInvoiceInvoiceLineSections(1234, { sort: "-id" })
      • getCustomerInvoiceMatchedTransactions: (
            customerInvoiceId: number,
            params?: GetCustomerInvoiceMatchedTransactionsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    amount: string;
                    archived_at: string
                    | null;
                    attachment_required: boolean;
                    bank_account: { id: number; url: string };
                    categories: readonly {
                        analytical_code: string | null;
                        category_group: { id: number };
                        created_at: string;
                        id: number;
                        label: string;
                        updated_at: string;
                        weight: string;
                    }[];
                    created_at: string;
                    currency: string
                    | null;
                    currency_amount: string;
                    currency_fee: string | null;
                    customer: { id: number; url: string } | null;
                    date: string;
                    fee: string | null;
                    id: number;
                    journal: { id: number };
                    label: string | null;
                    outstanding_balance: string | null;
                    pro_account_expense:
                        | {
                            card_masked_number: string;
                            employee: { first_name: ...; id: ...; last_name: ... }
                            | null;
                        }
                        | null;
                    updated_at: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerInvoiceMatchedTransactionsError,
            PennylaneClient,
        >

        Retrieves a list of matched transactions for a specific customer invoice.

        Uses cursor-based pagination.

        Possible errors:

        • GetCustomerInvoiceMatchedTransactionsBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoiceMatchedTransactionsUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoiceMatchedTransactionsForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoiceMatchedTransactionsNotFound (404): Invoice not found
      • getCustomerInvoicePayments: (
            customerInvoiceId: number,
            params?: GetCustomerInvoicePaymentsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    created_at: string;
                    currency: string
                    | null;
                    currency_amount: string;
                    id: number;
                    label: string;
                    status:
                        | "error"
                        | "submitted"
                        | "cancelled"
                        | "initiated"
                        | "pending"
                        | "emitted"
                        | "found"
                        | "not_found"
                        | "aborted"
                        | "refunded"
                        | "prepared"
                        | "pending_customer_approval"
                        | "pending_submission"
                        | "confirmed"
                        | "paid_out"
                        | "customer_approval_denied"
                        | "failed"
                        | "charged_back"
                        | "resubmission_requested";
                    updated_at: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerInvoicePaymentsError,
            PennylaneClient,
        >

        Retrieves a list of payments for a specific customer invoice.

        Uses cursor-based pagination.

        Possible errors:

        • GetCustomerInvoicePaymentsBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoicePaymentsUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoicePaymentsForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoicePaymentsNotFound (404): Invoice not found
      • getCustomerInvoices: (
            params?: GetCustomerInvoicesQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    amount: string;
                    appendices: { url: string };
                    archived_at: string | null;
                    billing_subscription: { id: number } | null;
                    categories: { url: string };
                    created_at: string;
                    credited_invoice: { id: number; url: string } | null;
                    currency: string;
                    currency_amount: string;
                    currency_amount_before_tax: string;
                    currency_tax: string;
                    custom_header_fields: { url: string };
                    customer: { id: number; url: string } | null;
                    customer_invoice_template: { id: number } | null;
                    date: string | null;
                    deadline: string | null;
                    discount: { type: "absolute" | "relative"; value: string };
                    draft: boolean;
                    e_invoicing:
                        | {
                            reason: string
                            | null;
                            status:
                                | "accepted"
                                | "approved"
                                | "collected"
                                | "in_dispute"
                                | "partially_collected"
                                | "refused"
                                | "rejected"
                                | "sent"
                                | "submitted";
                        }
                        | null;
                    exchange_rate: string;
                    external_reference: string;
                    filename: string
                    | null;
                    id: number;
                    invoice_line_sections: { url: string };
                    invoice_lines: { url: string };
                    invoice_number: string;
                    label: string | null;
                    language: "fr_FR" | "en_GB";
                    ledger_entry: { id: number };
                    matched_transactions: { url: string };
                    paid: boolean;
                    payments: { url: string };
                    pdf_description: string | null;
                    pdf_invoice_free_text: string;
                    pdf_invoice_subject: string;
                    public_file_url: string | null;
                    quote: { id: number } | null;
                    remaining_amount_with_tax: string | null;
                    remaining_amount_without_tax: string | null;
                    special_mention: string | null;
                    status:
                        | "paid"
                        | "archived"
                        | "incomplete"
                        | "cancelled"
                        | "partially_paid"
                        | "partially_cancelled"
                        | "upcoming"
                        | "late"
                        | "draft"
                        | "credit_note";
                    tax: string;
                    transaction_reference: | {
                        banking_provider: string;
                        provider_field_name: string;
                        provider_field_value: string;
                    }
                    | null;
                    updated_at: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerInvoicesError,
            PennylaneClient,
        >

        Retrieves a list of customer invoices and credit notes.

        Uses v2026 cursor-based pagination.

        Possible errors:

        • GetCustomerInvoicesBadRequest (400): Missing or invalid query parameters
        • GetCustomerInvoicesUnauthorized (401): Invalid or missing API key
        • GetCustomerInvoicesForbidden (403): Insufficient permissions for this operation
        • GetCustomerInvoicesNotFound (404): Not found
        // Get first page of invoices
        yield* CustomerInvoicesApi.getCustomerInvoices({ limit: 20 })

        // Get next page using cursor
        yield* CustomerInvoicesApi.getCustomerInvoices({ cursor: "MjAyNS0wMS0wOVQwODoyNDozOC44MTI0NTha" })

        // Filter invoices by customer and status
        yield* CustomerInvoicesApi.getCustomerInvoices({
        filter: [
        { field: "customer_id", operator: "eq", value: "123" },
        { field: "draft", operator: "eq", value: "false" }
        ]
        })
      • importCustomerInvoice: (
            body: ImportCustomerInvoiceBody,
        ) => Effect<
            {
                amount: string;
                appendices: { url: string };
                archived_at: string | null;
                billing_subscription: { id: number } | null;
                categories: { url: string };
                created_at: string;
                credited_invoice: { id: number; url: string } | null;
                currency: string;
                currency_amount: string;
                currency_amount_before_tax: string;
                currency_tax: string;
                custom_header_fields: { url: string };
                customer: { id: number; url: string } | null;
                customer_invoice_template: { id: number } | null;
                date: string | null;
                deadline: string | null;
                discount: { type: "absolute" | "relative"; value: string };
                draft: boolean;
                e_invoicing:
                    | {
                        reason: string
                        | null;
                        status:
                            | "accepted"
                            | "approved"
                            | "collected"
                            | "in_dispute"
                            | "partially_collected"
                            | "refused"
                            | "rejected"
                            | "sent"
                            | "submitted";
                    }
                    | null;
                exchange_rate: string;
                external_reference: string;
                filename: string
                | null;
                id: number;
                invoice_line_sections: { url: string };
                invoice_lines: { url: string };
                invoice_number: string;
                label: string | null;
                language: "fr_FR" | "en_GB";
                ledger_entry: { id: number };
                matched_transactions: { url: string };
                paid: boolean;
                payments: { url: string };
                pdf_description: string | null;
                pdf_invoice_free_text: string;
                pdf_invoice_subject: string;
                public_file_url: string | null;
                quote: { id: number } | null;
                remaining_amount_with_tax: string | null;
                remaining_amount_without_tax: string | null;
                special_mention: string | null;
                status:
                    | "paid"
                    | "archived"
                    | "incomplete"
                    | "cancelled"
                    | "partially_paid"
                    | "partially_cancelled"
                    | "upcoming"
                    | "late"
                    | "draft"
                    | "credit_note";
                tax: string;
                transaction_reference: | {
                    banking_provider: string;
                    provider_field_name: string;
                    provider_field_value: string;
                }
                | null;
                updated_at: string;
            },
            ImportCustomerInvoiceError,
            PennylaneClient,
        >

        Imports a customer invoice with a previously uploaded attached file.

        Possible errors:

        • ImportCustomerInvoiceBadRequest (400): Missing or invalid request body
        • ImportCustomerInvoiceUnauthorized (401): Invalid or missing API key
        • ImportCustomerInvoiceForbidden (403): Insufficient permissions for this operation
        • ImportCustomerInvoiceNotFound (404): Related resource not found
        • ImportCustomerInvoiceConflict (409): Conflict with current resource state
        • ImportCustomerInvoiceUnprocessableEntity (422): Request rejected by business validation
      • linkCreditNote: (
            customerInvoiceId: number,
            body: LinkCreditNoteBody,
        ) => Effect<
            {
                amount: string;
                appendices: { url: string };
                archived_at: string | null;
                billing_subscription: { id: number } | null;
                categories: { url: string };
                created_at: string;
                credited_invoice: { id: number; url: string } | null;
                currency: string;
                currency_amount: string;
                currency_amount_before_tax: string;
                currency_tax: string;
                custom_header_fields: { url: string };
                customer: { id: number; url: string } | null;
                customer_invoice_template: { id: number } | null;
                date: string | null;
                deadline: string | null;
                discount: { type: "absolute" | "relative"; value: string };
                draft: boolean;
                e_invoicing:
                    | {
                        reason: string
                        | null;
                        status:
                            | "accepted"
                            | "approved"
                            | "collected"
                            | "in_dispute"
                            | "partially_collected"
                            | "refused"
                            | "rejected"
                            | "sent"
                            | "submitted";
                    }
                    | null;
                exchange_rate: string;
                external_reference: string;
                filename: string
                | null;
                id: number;
                invoice_line_sections: { url: string };
                invoice_lines: { url: string };
                invoice_number: string;
                label: string | null;
                language: "fr_FR" | "en_GB";
                ledger_entry: { id: number };
                matched_transactions: { url: string };
                paid: boolean;
                payments: { url: string };
                pdf_description: string | null;
                pdf_invoice_free_text: string;
                pdf_invoice_subject: string;
                public_file_url: string | null;
                quote: { id: number } | null;
                remaining_amount_with_tax: string | null;
                remaining_amount_without_tax: string | null;
                special_mention: string | null;
                status:
                    | "paid"
                    | "archived"
                    | "incomplete"
                    | "cancelled"
                    | "partially_paid"
                    | "partially_cancelled"
                    | "upcoming"
                    | "late"
                    | "draft"
                    | "credit_note";
                tax: string;
                transaction_reference: | {
                    banking_provider: string;
                    provider_field_name: string;
                    provider_field_value: string;
                }
                | null;
                updated_at: string;
            },
            LinkCreditNoteError,
            PennylaneClient,
        >

        Links a credit note to a customer invoice.

        Possible errors:

        • LinkCreditNoteBadRequest (400): Missing or invalid request parameters
        • LinkCreditNoteUnauthorized (401): Invalid or missing API key
        • LinkCreditNoteForbidden (403): Insufficient permissions for this operation
        • LinkCreditNoteNotFound (404): Invoice or credit note not found
        • LinkCreditNoteUnprocessableEntity (422): Request rejected by business validation
      • markAsPaid: (
            invoiceId: number,
        ) => Effect<void, MarkCustomerInvoiceAsPaidError, PennylaneClient>

        Marks a customer invoice as paid. No automatic reconciliation will be done once the invoice is marked as paid.

      • sendCustomerInvoiceByEmail: (
            customerInvoiceId: number,
            body?: SendCustomerInvoiceByEmailBody,
        ) => Effect<void, SendCustomerInvoiceByEmailError, PennylaneClient>

        Sends a customer invoice or credit note by email.

        Possible errors:

        • SendCustomerInvoiceByEmailBadRequest (400): Missing or invalid request body
        • SendCustomerInvoiceByEmailUnauthorized (401): Invalid or missing API key
        • SendCustomerInvoiceByEmailForbidden (403): Insufficient permissions for this operation
        • SendCustomerInvoiceByEmailNotFound (404): Invoice not found
        • SendCustomerInvoiceByEmailConflict (409): Invoice PDF is not ready yet, retry later
        • SendCustomerInvoiceByEmailUnprocessableEntity (422): Request rejected by business validation
      • updateCustomerInvoice: (
            invoiceId: number,
            body: UpdateCustomerInvoiceBody,
        ) => Effect<
            {
                amount: string;
                appendices: { url: string };
                archived_at: string | null;
                billing_subscription: { id: number } | null;
                categories: { url: string };
                created_at: string;
                credited_invoice: { id: number; url: string } | null;
                currency: string;
                currency_amount: string;
                currency_amount_before_tax: string;
                currency_tax: string;
                custom_header_fields: { url: string };
                customer: { id: number; url: string } | null;
                customer_invoice_template: { id: number } | null;
                date: string | null;
                deadline: string | null;
                discount: { type: "absolute" | "relative"; value: string };
                draft: boolean;
                e_invoicing:
                    | {
                        reason: string
                        | null;
                        status:
                            | "accepted"
                            | "approved"
                            | "collected"
                            | "in_dispute"
                            | "partially_collected"
                            | "refused"
                            | "rejected"
                            | "sent"
                            | "submitted";
                    }
                    | null;
                exchange_rate: string;
                external_reference: string;
                filename: string
                | null;
                id: number;
                invoice_line_sections: { url: string };
                invoice_lines: { url: string };
                invoice_number: string;
                label: string | null;
                language: "fr_FR" | "en_GB";
                ledger_entry: { id: number };
                matched_transactions: { url: string };
                paid: boolean;
                payments: { url: string };
                pdf_description: string | null;
                pdf_invoice_free_text: string;
                pdf_invoice_subject: string;
                public_file_url: string | null;
                quote: { id: number } | null;
                remaining_amount_with_tax: string | null;
                remaining_amount_without_tax: string | null;
                special_mention: string | null;
                status:
                    | "paid"
                    | "archived"
                    | "incomplete"
                    | "cancelled"
                    | "partially_paid"
                    | "partially_cancelled"
                    | "upcoming"
                    | "late"
                    | "draft"
                    | "credit_note";
                tax: string;
                transaction_reference: | {
                    banking_provider: string;
                    provider_field_name: string;
                    provider_field_value: string;
                }
                | null;
                updated_at: string;
            },
            UpdateCustomerInvoiceError,
            PennylaneClient,
        >

        Updates a customer invoice.

        Supports two modes depending on the invoice state:

        • Draft invoice: update customer, dates, lines (create/update/delete), currency, etc.
        • Finalized invoice: update transaction reference, update line imputation dates.

        Possible errors:

        • UpdateCustomerInvoiceBadRequest (400): Missing or invalid request body
        • UpdateCustomerInvoiceUnauthorized (401): Invalid or missing API key
        • UpdateCustomerInvoiceForbidden (403): Insufficient permissions for this operation
        • UpdateCustomerInvoiceNotFound (404): Invoice not found
        • UpdateCustomerInvoiceUnprocessableEntity (422): Request rejected by business validation
      • updateImportedCustomerInvoice: (
            invoiceId: number,
            body: UpdateImportedCustomerInvoiceBody,
        ) => Effect<
            {
                amount: string;
                appendices: { url: string };
                archived_at: string | null;
                billing_subscription: { id: number } | null;
                categories: { url: string };
                created_at: string;
                credited_invoice: { id: number; url: string } | null;
                currency: string;
                currency_amount: string;
                currency_amount_before_tax: string;
                currency_tax: string;
                custom_header_fields: { url: string };
                customer: { id: number; url: string } | null;
                customer_invoice_template: { id: number } | null;
                date: string | null;
                deadline: string | null;
                discount: { type: "absolute" | "relative"; value: string };
                draft: boolean;
                e_invoicing:
                    | {
                        reason: string
                        | null;
                        status:
                            | "accepted"
                            | "approved"
                            | "collected"
                            | "in_dispute"
                            | "partially_collected"
                            | "refused"
                            | "rejected"
                            | "sent"
                            | "submitted";
                    }
                    | null;
                exchange_rate: string;
                external_reference: string;
                filename: string
                | null;
                id: number;
                invoice_line_sections: { url: string };
                invoice_lines: { url: string };
                invoice_number: string;
                label: string | null;
                language: "fr_FR" | "en_GB";
                ledger_entry: { id: number };
                matched_transactions: { url: string };
                paid: boolean;
                payments: { url: string };
                pdf_description: string | null;
                pdf_invoice_free_text: string;
                pdf_invoice_subject: string;
                public_file_url: string | null;
                quote: { id: number } | null;
                remaining_amount_with_tax: string | null;
                remaining_amount_without_tax: string | null;
                special_mention: string | null;
                status:
                    | "paid"
                    | "archived"
                    | "incomplete"
                    | "cancelled"
                    | "partially_paid"
                    | "partially_cancelled"
                    | "upcoming"
                    | "late"
                    | "draft"
                    | "credit_note";
                tax: string;
                transaction_reference: | {
                    banking_provider: string;
                    provider_field_name: string;
                    provider_field_value: string;
                }
                | null;
                updated_at: string;
            },
            UpdateImportedCustomerInvoiceError,
            PennylaneClient,
        >

        Updates an imported customer invoice or credit note.

        This endpoint is not applicable for draft invoices.

        Possible errors:

        • UpdateImportedCustomerInvoiceBadRequest (400): Missing or invalid request body
        • UpdateImportedCustomerInvoiceUnauthorized (401): Invalid or missing API key
        • UpdateImportedCustomerInvoiceForbidden (403): Insufficient permissions for this operation
        • UpdateImportedCustomerInvoiceNotFound (404): Invoice not found
        • UpdateImportedCustomerInvoiceUnprocessableEntity (422): Request rejected by business validation
      • uploadCustomerInvoiceAppendix: (
            customerInvoiceId: number,
            body: UploadCustomerInvoiceAppendixBody,
        ) => Effect<
            {
                created_at: string;
                filename: string;
                id: number;
                updated_at: string;
                url: string;
            },
            UploadCustomerInvoiceAppendixError,
            PennylaneClient,
        >

        Uploads an appendix file for a specific customer invoice.

        Possible errors:

        • UploadCustomerInvoiceAppendixBadRequest (400): Missing or invalid request body
        • UploadCustomerInvoiceAppendixUnauthorized (401): Invalid or missing API key
        • UploadCustomerInvoiceAppendixForbidden (403): Insufficient permissions for this operation
        • UploadCustomerInvoiceAppendixNotFound (404): Invoice not found
        • UploadCustomerInvoiceAppendixUnprocessableEntity (422): Upload rejected by business validation
    • customers: {
          categorizeCustomer: (
              id: string,
              body: CategorizeCustomerBody,
          ) => Effect<
              readonly {
                  analytical_code: string
                  | null;
                  category_group: { id: number };
                  created_at: string;
                  id: number;
                  label: string;
                  updated_at: string;
                  weight: string;
              }[],
              CategorizeCustomerError,
              PennylaneClient,
          >;
          createCompanyCustomer: (
              body: CreateCompanyCustomerBody,
          ) => Effect<
              {
                  billing_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  billing_iban: string
                  | null;
                  billing_language: "fr_FR" | "en_GB" | "de_DE";
                  contacts: { url: string };
                  created_at: string;
                  delivery_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  emails: readonly string[];
                  external_reference: string;
                  id: number;
                  ledger_account: { id: number }
                  | null;
                  mandates: { url: string };
                  name: string;
                  notes: string | null;
                  payment_conditions:
                      | "upon_receipt"
                      | "custom"
                      | "7_days"
                      | "15_days"
                      | "30_days"
                      | "30_days_end_of_month"
                      | "45_days"
                      | "45_days_end_of_month"
                      | "60_days";
                  phone: string;
                  pro_account_mandates: { url: string };
                  recipient: string;
                  reference: string | null;
                  reg_no: string;
                  updated_at: string;
                  vat_number: string;
              },
              CreateCompanyCustomerError,
              PennylaneClient,
          >;
          createIndividualCustomer: (
              body: CreateIndividualCustomerBody,
          ) => Effect<
              {
                  billing_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  billing_iban: string
                  | null;
                  billing_language: "fr_FR" | "en_GB" | "de_DE";
                  contacts: { url: string };
                  created_at: string;
                  delivery_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  emails: readonly string[];
                  external_reference: string;
                  first_name: string;
                  id: number;
                  last_name: string;
                  ledger_account: { id: number }
                  | null;
                  mandates: { url: string };
                  name: string;
                  notes: string | null;
                  payment_conditions:
                      | "upon_receipt"
                      | "custom"
                      | "7_days"
                      | "15_days"
                      | "30_days"
                      | "30_days_end_of_month"
                      | "45_days"
                      | "45_days_end_of_month"
                      | "60_days";
                  phone: string;
                  pro_account_mandates: { url: string };
                  recipient: string;
                  reference: string | null;
                  updated_at: string;
              },
              CreateIndividualCustomerError,
              PennylaneClient,
          >;
          getCompanyCustomer: (
              id: string,
          ) => Effect<
              {
                  billing_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  billing_iban: string
                  | null;
                  billing_language: "fr_FR" | "en_GB" | "de_DE";
                  contacts: { url: string };
                  created_at: string;
                  delivery_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  emails: readonly string[];
                  external_reference: string;
                  id: number;
                  ledger_account: { id: number }
                  | null;
                  mandates: { url: string };
                  name: string;
                  notes: string | null;
                  payment_conditions:
                      | "upon_receipt"
                      | "custom"
                      | "7_days"
                      | "15_days"
                      | "30_days"
                      | "30_days_end_of_month"
                      | "45_days"
                      | "45_days_end_of_month"
                      | "60_days";
                  phone: string;
                  pro_account_mandates: { url: string };
                  recipient: string;
                  reference: string | null;
                  reg_no: string;
                  updated_at: string;
                  vat_number: string;
              },
              GetCompanyCustomerError,
              PennylaneClient,
          >;
          getCustomer: (
              id: string,
          ) => Effect<
              | {
                  billing_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  billing_iban: string
                  | null;
                  billing_language: "fr_FR" | "en_GB" | "de_DE";
                  contacts: { url: string };
                  created_at: string;
                  customer_type: "company";
                  delivery_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  emails: readonly string[];
                  external_reference: string;
                  id: number;
                  ledger_account: { id: number }
                  | null;
                  mandates: { url: string };
                  name: string;
                  notes: string | null;
                  payment_conditions:
                      | "upon_receipt"
                      | "custom"
                      | "7_days"
                      | "15_days"
                      | "30_days"
                      | "30_days_end_of_month"
                      | "45_days"
                      | "45_days_end_of_month"
                      | "60_days";
                  phone: string;
                  pro_account_mandates: { url: string };
                  recipient: string;
                  reference: string | null;
                  reg_no: string;
                  updated_at: string;
                  vat_number: string;
              }
              | {
                  billing_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  billing_iban: string
                  | null;
                  billing_language: "fr_FR" | "en_GB" | "de_DE";
                  contacts: { url: string };
                  created_at: string;
                  customer_type: "individual";
                  delivery_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  emails: readonly string[];
                  external_reference: string;
                  first_name: string;
                  id: number;
                  last_name: string;
                  ledger_account: { id: number }
                  | null;
                  mandates: { url: string };
                  name: string;
                  notes: string | null;
                  payment_conditions:
                      | "upon_receipt"
                      | "custom"
                      | "7_days"
                      | "15_days"
                      | "30_days"
                      | "30_days_end_of_month"
                      | "45_days"
                      | "45_days_end_of_month"
                      | "60_days";
                  phone: string;
                  pro_account_mandates: { url: string };
                  recipient: string;
                  reference: string | null;
                  updated_at: string;
              },
              GetCustomerError,
              PennylaneClient,
          >;
          getCustomerCategories: (
              customerId: string,
              params?: GetCustomerCategoriesQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      analytical_code: string
                      | null;
                      category_group: { id: number };
                      created_at: string;
                      id: number;
                      label: string;
                      updated_at: string;
                      weight: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerCategoriesError,
              PennylaneClient,
          >;
          getCustomerContacts: (
              customerId: string,
              params?: GetCustomerContactsQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      created_at: string;
                      email: string;
                      first_name: string;
                      id: number;
                      last_name: string;
                      mobile_number: string;
                      role: string;
                      telephone_number: string;
                      updated_at: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetCustomerContactsError,
              PennylaneClient,
          >;
          getCustomers: (
              params?: GetCustomersQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly (
                      | {
                          billing_address: {
                              address: string;
                              city: string;
                              country_alpha2: string;
                              postal_code: string;
                          };
                          billing_iban: string
                          | null;
                          billing_language: "fr_FR" | "en_GB" | "de_DE";
                          contacts: { url: string };
                          created_at: string;
                          customer_type: "company";
                          delivery_address: {
                              address: string;
                              city: string;
                              country_alpha2: string;
                              postal_code: string;
                          };
                          emails: readonly string[];
                          external_reference: string;
                          id: number;
                          ledger_account: { id: number }
                          | null;
                          mandates: { url: string };
                          name: string;
                          notes: string | null;
                          payment_conditions:
                              | "upon_receipt"
                              | "custom"
                              | "7_days"
                              | "15_days"
                              | "30_days"
                              | "30_days_end_of_month"
                              | "45_days"
                              | "45_days_end_of_month"
                              | "60_days";
                          phone: string;
                          pro_account_mandates: { url: string };
                          recipient: string;
                          reference: string | null;
                          reg_no: string;
                          updated_at: string;
                          vat_number: string;
                      }
                      | {
                          billing_address: {
                              address: string;
                              city: string;
                              country_alpha2: string;
                              postal_code: string;
                          };
                          billing_iban: string
                          | null;
                          billing_language: "fr_FR" | "en_GB" | "de_DE";
                          contacts: { url: string };
                          created_at: string;
                          customer_type: "individual";
                          delivery_address: {
                              address: string;
                              city: string;
                              country_alpha2: string;
                              postal_code: string;
                          };
                          emails: readonly string[];
                          external_reference: string;
                          first_name: string;
                          id: number;
                          last_name: string;
                          ledger_account: { id: number }
                          | null;
                          mandates: { url: string };
                          name: string;
                          notes: string | null;
                          payment_conditions:
                              | "upon_receipt"
                              | "custom"
                              | "7_days"
                              | "15_days"
                              | "30_days"
                              | "30_days_end_of_month"
                              | "45_days"
                              | "45_days_end_of_month"
                              | "60_days";
                          phone: string;
                          pro_account_mandates: { url: string };
                          recipient: string;
                          reference: string | null;
                          updated_at: string;
                      }
                  )[];
                  next_cursor?: string
                  | null;
              },
              GetCustomersError,
              PennylaneClient,
          >;
          getIndividualCustomer: (
              id: string,
          ) => Effect<
              {
                  billing_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  billing_iban: string
                  | null;
                  billing_language: "fr_FR" | "en_GB" | "de_DE";
                  contacts: { url: string };
                  created_at: string;
                  delivery_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  emails: readonly string[];
                  external_reference: string;
                  first_name: string;
                  id: number;
                  last_name: string;
                  ledger_account: { id: number }
                  | null;
                  mandates: { url: string };
                  name: string;
                  notes: string | null;
                  payment_conditions:
                      | "upon_receipt"
                      | "custom"
                      | "7_days"
                      | "15_days"
                      | "30_days"
                      | "30_days_end_of_month"
                      | "45_days"
                      | "45_days_end_of_month"
                      | "60_days";
                  phone: string;
                  pro_account_mandates: { url: string };
                  recipient: string;
                  reference: string | null;
                  updated_at: string;
              },
              GetIndividualCustomerError,
              PennylaneClient,
          >;
          updateCompanyCustomer: (
              id: string,
              body: UpdateCompanyCustomerBody,
          ) => Effect<
              {
                  billing_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  billing_iban: string
                  | null;
                  billing_language: "fr_FR" | "en_GB" | "de_DE";
                  contacts: { url: string };
                  created_at: string;
                  delivery_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  emails: readonly string[];
                  external_reference: string;
                  id: number;
                  ledger_account: { id: number }
                  | null;
                  mandates: { url: string };
                  name: string;
                  notes: string | null;
                  payment_conditions:
                      | "upon_receipt"
                      | "custom"
                      | "7_days"
                      | "15_days"
                      | "30_days"
                      | "30_days_end_of_month"
                      | "45_days"
                      | "45_days_end_of_month"
                      | "60_days";
                  phone: string;
                  pro_account_mandates: { url: string };
                  recipient: string;
                  reference: string | null;
                  reg_no: string;
                  updated_at: string;
                  vat_number: string;
              },
              UpdateCompanyCustomerError,
              PennylaneClient,
          >;
          updateIndividualCustomer: (
              id: string,
              body: UpdateIndividualCustomerBody,
          ) => Effect<
              {
                  billing_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  billing_iban: string
                  | null;
                  billing_language: "fr_FR" | "en_GB" | "de_DE";
                  contacts: { url: string };
                  created_at: string;
                  delivery_address: {
                      address: string;
                      city: string;
                      country_alpha2: string;
                      postal_code: string;
                  };
                  emails: readonly string[];
                  external_reference: string;
                  first_name: string;
                  id: number;
                  last_name: string;
                  ledger_account: { id: number }
                  | null;
                  mandates: { url: string };
                  name: string;
                  notes: string | null;
                  payment_conditions:
                      | "upon_receipt"
                      | "custom"
                      | "7_days"
                      | "15_days"
                      | "30_days"
                      | "30_days_end_of_month"
                      | "45_days"
                      | "45_days_end_of_month"
                      | "60_days";
                  phone: string;
                  pro_account_mandates: { url: string };
                  recipient: string;
                  reference: string | null;
                  updated_at: string;
              },
              UpdateIndividualCustomerError,
              PennylaneClient,
          >;
      }
      • categorizeCustomer: (
            id: string,
            body: CategorizeCustomerBody,
        ) => Effect<
            readonly {
                analytical_code: string
                | null;
                category_group: { id: number };
                created_at: string;
                id: number;
                label: string;
                updated_at: string;
                weight: string;
            }[],
            CategorizeCustomerError,
            PennylaneClient,
        >

        Updates the categories assigned to a customer. The sum of weights for each category group must equal 1.

      • createCompanyCustomer: (
            body: CreateCompanyCustomerBody,
        ) => Effect<
            {
                billing_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                billing_iban: string
                | null;
                billing_language: "fr_FR" | "en_GB" | "de_DE";
                contacts: { url: string };
                created_at: string;
                delivery_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                emails: readonly string[];
                external_reference: string;
                id: number;
                ledger_account: { id: number }
                | null;
                mandates: { url: string };
                name: string;
                notes: string | null;
                payment_conditions:
                    | "upon_receipt"
                    | "custom"
                    | "7_days"
                    | "15_days"
                    | "30_days"
                    | "30_days_end_of_month"
                    | "45_days"
                    | "45_days_end_of_month"
                    | "60_days";
                phone: string;
                pro_account_mandates: { url: string };
                recipient: string;
                reference: string | null;
                reg_no: string;
                updated_at: string;
                vat_number: string;
            },
            CreateCompanyCustomerError,
            PennylaneClient,
        >

        Creates a new company customer.

      • createIndividualCustomer: (
            body: CreateIndividualCustomerBody,
        ) => Effect<
            {
                billing_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                billing_iban: string
                | null;
                billing_language: "fr_FR" | "en_GB" | "de_DE";
                contacts: { url: string };
                created_at: string;
                delivery_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                emails: readonly string[];
                external_reference: string;
                first_name: string;
                id: number;
                last_name: string;
                ledger_account: { id: number }
                | null;
                mandates: { url: string };
                name: string;
                notes: string | null;
                payment_conditions:
                    | "upon_receipt"
                    | "custom"
                    | "7_days"
                    | "15_days"
                    | "30_days"
                    | "30_days_end_of_month"
                    | "45_days"
                    | "45_days_end_of_month"
                    | "60_days";
                phone: string;
                pro_account_mandates: { url: string };
                recipient: string;
                reference: string | null;
                updated_at: string;
            },
            CreateIndividualCustomerError,
            PennylaneClient,
        >

        Creates a new individual customer.

      • getCompanyCustomer: (
            id: string,
        ) => Effect<
            {
                billing_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                billing_iban: string
                | null;
                billing_language: "fr_FR" | "en_GB" | "de_DE";
                contacts: { url: string };
                created_at: string;
                delivery_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                emails: readonly string[];
                external_reference: string;
                id: number;
                ledger_account: { id: number }
                | null;
                mandates: { url: string };
                name: string;
                notes: string | null;
                payment_conditions:
                    | "upon_receipt"
                    | "custom"
                    | "7_days"
                    | "15_days"
                    | "30_days"
                    | "30_days_end_of_month"
                    | "45_days"
                    | "45_days_end_of_month"
                    | "60_days";
                phone: string;
                pro_account_mandates: { url: string };
                recipient: string;
                reference: string | null;
                reg_no: string;
                updated_at: string;
                vat_number: string;
            },
            GetCompanyCustomerError,
            PennylaneClient,
        >

        Retrieves a company customer by its unique identifier.

      • getCustomer: (
            id: string,
        ) => Effect<
            | {
                billing_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                billing_iban: string
                | null;
                billing_language: "fr_FR" | "en_GB" | "de_DE";
                contacts: { url: string };
                created_at: string;
                customer_type: "company";
                delivery_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                emails: readonly string[];
                external_reference: string;
                id: number;
                ledger_account: { id: number }
                | null;
                mandates: { url: string };
                name: string;
                notes: string | null;
                payment_conditions:
                    | "upon_receipt"
                    | "custom"
                    | "7_days"
                    | "15_days"
                    | "30_days"
                    | "30_days_end_of_month"
                    | "45_days"
                    | "45_days_end_of_month"
                    | "60_days";
                phone: string;
                pro_account_mandates: { url: string };
                recipient: string;
                reference: string | null;
                reg_no: string;
                updated_at: string;
                vat_number: string;
            }
            | {
                billing_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                billing_iban: string
                | null;
                billing_language: "fr_FR" | "en_GB" | "de_DE";
                contacts: { url: string };
                created_at: string;
                customer_type: "individual";
                delivery_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                emails: readonly string[];
                external_reference: string;
                first_name: string;
                id: number;
                last_name: string;
                ledger_account: { id: number }
                | null;
                mandates: { url: string };
                name: string;
                notes: string | null;
                payment_conditions:
                    | "upon_receipt"
                    | "custom"
                    | "7_days"
                    | "15_days"
                    | "30_days"
                    | "30_days_end_of_month"
                    | "45_days"
                    | "45_days_end_of_month"
                    | "60_days";
                phone: string;
                pro_account_mandates: { url: string };
                recipient: string;
                reference: string | null;
                updated_at: string;
            },
            GetCustomerError,
            PennylaneClient,
        >

        Retrieves a customer (company or individual) by its unique identifier.

      • getCustomerCategories: (
            customerId: string,
            params?: GetCustomerCategoriesQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    analytical_code: string
                    | null;
                    category_group: { id: number };
                    created_at: string;
                    id: number;
                    label: string;
                    updated_at: string;
                    weight: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerCategoriesError,
            PennylaneClient,
        >

        Retrieves categories of a customer.

      • getCustomerContacts: (
            customerId: string,
            params?: GetCustomerContactsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    created_at: string;
                    email: string;
                    first_name: string;
                    id: number;
                    last_name: string;
                    mobile_number: string;
                    role: string;
                    telephone_number: string;
                    updated_at: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetCustomerContactsError,
            PennylaneClient,
        >

        Retrieves contacts of a customer.

      • getCustomers: (
            params?: GetCustomersQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly (
                    | {
                        billing_address: {
                            address: string;
                            city: string;
                            country_alpha2: string;
                            postal_code: string;
                        };
                        billing_iban: string
                        | null;
                        billing_language: "fr_FR" | "en_GB" | "de_DE";
                        contacts: { url: string };
                        created_at: string;
                        customer_type: "company";
                        delivery_address: {
                            address: string;
                            city: string;
                            country_alpha2: string;
                            postal_code: string;
                        };
                        emails: readonly string[];
                        external_reference: string;
                        id: number;
                        ledger_account: { id: number }
                        | null;
                        mandates: { url: string };
                        name: string;
                        notes: string | null;
                        payment_conditions:
                            | "upon_receipt"
                            | "custom"
                            | "7_days"
                            | "15_days"
                            | "30_days"
                            | "30_days_end_of_month"
                            | "45_days"
                            | "45_days_end_of_month"
                            | "60_days";
                        phone: string;
                        pro_account_mandates: { url: string };
                        recipient: string;
                        reference: string | null;
                        reg_no: string;
                        updated_at: string;
                        vat_number: string;
                    }
                    | {
                        billing_address: {
                            address: string;
                            city: string;
                            country_alpha2: string;
                            postal_code: string;
                        };
                        billing_iban: string
                        | null;
                        billing_language: "fr_FR" | "en_GB" | "de_DE";
                        contacts: { url: string };
                        created_at: string;
                        customer_type: "individual";
                        delivery_address: {
                            address: string;
                            city: string;
                            country_alpha2: string;
                            postal_code: string;
                        };
                        emails: readonly string[];
                        external_reference: string;
                        first_name: string;
                        id: number;
                        last_name: string;
                        ledger_account: { id: number }
                        | null;
                        mandates: { url: string };
                        name: string;
                        notes: string | null;
                        payment_conditions:
                            | "upon_receipt"
                            | "custom"
                            | "7_days"
                            | "15_days"
                            | "30_days"
                            | "30_days_end_of_month"
                            | "45_days"
                            | "45_days_end_of_month"
                            | "60_days";
                        phone: string;
                        pro_account_mandates: { url: string };
                        recipient: string;
                        reference: string | null;
                        updated_at: string;
                    }
                )[];
                next_cursor?: string
                | null;
            },
            GetCustomersError,
            PennylaneClient,
        >

        Retrieves a list of customers (company and individual).

      • getIndividualCustomer: (
            id: string,
        ) => Effect<
            {
                billing_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                billing_iban: string
                | null;
                billing_language: "fr_FR" | "en_GB" | "de_DE";
                contacts: { url: string };
                created_at: string;
                delivery_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                emails: readonly string[];
                external_reference: string;
                first_name: string;
                id: number;
                last_name: string;
                ledger_account: { id: number }
                | null;
                mandates: { url: string };
                name: string;
                notes: string | null;
                payment_conditions:
                    | "upon_receipt"
                    | "custom"
                    | "7_days"
                    | "15_days"
                    | "30_days"
                    | "30_days_end_of_month"
                    | "45_days"
                    | "45_days_end_of_month"
                    | "60_days";
                phone: string;
                pro_account_mandates: { url: string };
                recipient: string;
                reference: string | null;
                updated_at: string;
            },
            GetIndividualCustomerError,
            PennylaneClient,
        >

        Retrieves an individual customer by its unique identifier.

      • updateCompanyCustomer: (
            id: string,
            body: UpdateCompanyCustomerBody,
        ) => Effect<
            {
                billing_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                billing_iban: string
                | null;
                billing_language: "fr_FR" | "en_GB" | "de_DE";
                contacts: { url: string };
                created_at: string;
                delivery_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                emails: readonly string[];
                external_reference: string;
                id: number;
                ledger_account: { id: number }
                | null;
                mandates: { url: string };
                name: string;
                notes: string | null;
                payment_conditions:
                    | "upon_receipt"
                    | "custom"
                    | "7_days"
                    | "15_days"
                    | "30_days"
                    | "30_days_end_of_month"
                    | "45_days"
                    | "45_days_end_of_month"
                    | "60_days";
                phone: string;
                pro_account_mandates: { url: string };
                recipient: string;
                reference: string | null;
                reg_no: string;
                updated_at: string;
                vat_number: string;
            },
            UpdateCompanyCustomerError,
            PennylaneClient,
        >

        Updates an existing company customer.

      • updateIndividualCustomer: (
            id: string,
            body: UpdateIndividualCustomerBody,
        ) => Effect<
            {
                billing_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                billing_iban: string
                | null;
                billing_language: "fr_FR" | "en_GB" | "de_DE";
                contacts: { url: string };
                created_at: string;
                delivery_address: {
                    address: string;
                    city: string;
                    country_alpha2: string;
                    postal_code: string;
                };
                emails: readonly string[];
                external_reference: string;
                first_name: string;
                id: number;
                last_name: string;
                ledger_account: { id: number }
                | null;
                mandates: { url: string };
                name: string;
                notes: string | null;
                payment_conditions:
                    | "upon_receipt"
                    | "custom"
                    | "7_days"
                    | "15_days"
                    | "30_days"
                    | "30_days_end_of_month"
                    | "45_days"
                    | "45_days_end_of_month"
                    | "60_days";
                phone: string;
                pro_account_mandates: { url: string };
                recipient: string;
                reference: string | null;
                updated_at: string;
            },
            UpdateIndividualCustomerError,
            PennylaneClient,
        >

        Updates an existing individual customer.

    • journals: {
          createJournal: (
              body: CreateJournalBody,
          ) => Effect<
              { code: string; id: number; label: string; type: string },
              CreateJournalError,
              PennylaneClient,
          >;
          getJournal: (
              id: number,
          ) => Effect<
              { code: string; id: number; label: string; type: string },
              GetJournalError,
              PennylaneClient,
          >;
          getJournals: (
              params?: GetJournalsQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly { code: string; id: number; label: string; type: string }[];
                  next_cursor?: string | null;
              },
              GetJournalsError,
              PennylaneClient,
          >;
      }
      • createJournal: (
            body: CreateJournalBody,
        ) => Effect<
            { code: string; id: number; label: string; type: string },
            CreateJournalError,
            PennylaneClient,
        >

        Creates a new journal.

        Possible errors:

        • CreateJournalBadRequest (400): Missing or invalid request parameters
        • CreateJournalUnauthorized (401): Invalid or missing API key
        • CreateJournalForbidden (403): Insufficient permissions for this operation
        • CreateJournalUnprocessableEntity (422): Request data is invalid (e.g., code already exists)
        yield* JournalsApi.createJournal({ code: "VT", label: "Sales" })
        
      • getJournal: (
            id: number,
        ) => Effect<
            { code: string; id: number; label: string; type: string },
            GetJournalError,
            PennylaneClient,
        >

        Retrieves a single journal by its unique identifier.

        Uses v2026 behavior only.

      • getJournals: (
            params?: GetJournalsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly { code: string; id: number; label: string; type: string }[];
                next_cursor?: string | null;
            },
            GetJournalsError,
            PennylaneClient,
        >

        Retrieves a list of journals.

        Uses only v2026 pagination and query options.

        // Get first page with new pagination
        yield* JournalsApi.getJournals({ limit: 10 })

        // Get next page using cursor
        yield* JournalsApi.getJournals({ cursor: "MjAyNS0wMS0wOVQwODoyNDozOC44MTI0NTha" })

        // Filter journals of type "sale"
        yield* JournalsApi.getJournals({
        filter: [{ field: "type", operator: "eq", value: "sale" }],
        })
    • products: {
          createProduct: (
              body: CreateProductBody,
          ) => Effect<
              {
                  archived_at: string
                  | null;
                  created_at: string;
                  currency: string;
                  description: string;
                  external_reference: string;
                  id: number;
                  label: string;
                  ledger_account: { id: number } | null;
                  price: string;
                  price_before_tax: string;
                  reference: string | null;
                  unit: string;
                  updated_at: string;
                  vat_rate: string;
              },
              CreateProductError,
              PennylaneClient,
          >;
          getProduct: (
              id: number,
          ) => Effect<
              {
                  archived_at: string
                  | null;
                  created_at: string;
                  currency: string;
                  description: string;
                  external_reference: string;
                  id: number;
                  label: string;
                  ledger_account: { id: number } | null;
                  price: string;
                  price_before_tax: string;
                  reference: string | null;
                  unit: string;
                  updated_at: string;
                  vat_rate: string;
              },
              GetProductError,
              PennylaneClient,
          >;
          getProducts: (
              params?: GetProductsQueryParams,
          ) => Effect<
              {
                  has_more: boolean;
                  items: readonly {
                      archived_at: string
                      | null;
                      created_at: string;
                      currency: string;
                      description: string;
                      external_reference: string;
                      id: number;
                      label: string;
                      ledger_account: { id: number } | null;
                      price: string;
                      price_before_tax: string;
                      reference: string | null;
                      unit: string;
                      updated_at: string;
                      vat_rate: string;
                  }[];
                  next_cursor?: string
                  | null;
              },
              GetProductsError,
              PennylaneClient,
          >;
          updateProduct: (
              id: number,
              body: UpdateProductBody,
          ) => Effect<
              {
                  archived_at: string
                  | null;
                  created_at: string;
                  currency: string;
                  description: string;
                  external_reference: string;
                  id: number;
                  label: string;
                  ledger_account: { id: number } | null;
                  price: string;
                  price_before_tax: string;
                  reference: string | null;
                  unit: string;
                  updated_at: string;
                  vat_rate: string;
              },
              UpdateProductError,
              PennylaneClient,
          >;
      }
      • createProduct: (
            body: CreateProductBody,
        ) => Effect<
            {
                archived_at: string
                | null;
                created_at: string;
                currency: string;
                description: string;
                external_reference: string;
                id: number;
                label: string;
                ledger_account: { id: number } | null;
                price: string;
                price_before_tax: string;
                reference: string | null;
                unit: string;
                updated_at: string;
                vat_rate: string;
            },
            CreateProductError,
            PennylaneClient,
        >

        Creates a new product.

      • getProduct: (
            id: number,
        ) => Effect<
            {
                archived_at: string
                | null;
                created_at: string;
                currency: string;
                description: string;
                external_reference: string;
                id: number;
                label: string;
                ledger_account: { id: number } | null;
                price: string;
                price_before_tax: string;
                reference: string | null;
                unit: string;
                updated_at: string;
                vat_rate: string;
            },
            GetProductError,
            PennylaneClient,
        >

        Retrieves a single product by its unique identifier.

      • getProducts: (
            params?: GetProductsQueryParams,
        ) => Effect<
            {
                has_more: boolean;
                items: readonly {
                    archived_at: string
                    | null;
                    created_at: string;
                    currency: string;
                    description: string;
                    external_reference: string;
                    id: number;
                    label: string;
                    ledger_account: { id: number } | null;
                    price: string;
                    price_before_tax: string;
                    reference: string | null;
                    unit: string;
                    updated_at: string;
                    vat_rate: string;
                }[];
                next_cursor?: string
                | null;
            },
            GetProductsError,
            PennylaneClient,
        >

        Retrieves a list of products.

      • updateProduct: (
            id: number,
            body: UpdateProductBody,
        ) => Effect<
            {
                archived_at: string
                | null;
                created_at: string;
                currency: string;
                description: string;
                external_reference: string;
                id: number;
                label: string;
                ledger_account: { id: number } | null;
                price: string;
                price_before_tax: string;
                reference: string | null;
                unit: string;
                updated_at: string;
                vat_rate: string;
            },
            UpdateProductError,
            PennylaneClient,
        >

        Updates an existing product.