/** * Billing Domain - Contract * * Constants and types for the billing domain. * All validated types are derived from schemas (see schema.ts). */ // ============================================================================ // Invoice Status Constants // ============================================================================ /** * All possible invoice statuses in WHMCS. * * Note: Only a subset of these (Paid, Unpaid, Cancelled, Overdue, Collections) * can be used as filters in the GetInvoices API. Draft, Pending, and Refunded * exist on invoices but cannot be used as query filters. * * @see VALID_INVOICE_QUERY_STATUSES in constants.ts for queryable statuses * @see InvoiceQueryStatus type for the query filter type */ export const INVOICE_STATUS = { DRAFT: "Draft", PENDING: "Pending", PAID: "Paid", UNPAID: "Unpaid", OVERDUE: "Overdue", CANCELLED: "Cancelled", REFUNDED: "Refunded", COLLECTIONS: "Collections", } as const; // ============================================================================ // Re-export Types from Schema (Schema-First Approach) // ============================================================================ export type { InvoiceStatus, InvoiceQueryStatus, InvoiceItem, Invoice, InvoicePagination, InvoiceList, InvoiceSsoLink, PaymentInvoiceRequest, BillingSummary, InvoiceQueryParams, InvoiceListQuery, } from "./schema.js";