- Adjusted .prettierrc to ensure consistent formatting with a newline at the end of the file. - Reformatted eslint.config.mjs for improved readability by aligning array elements. - Updated pnpm-lock.yaml to use single quotes for consistency across dependencies. - Simplified worktree setup in .cursor/worktrees.json for cleaner configuration. - Enhanced documentation in .cursor/plans to clarify architecture refactoring. - Refactored various service files for improved readability and maintainability, including rate-limiting and auth services. - Updated imports and exports across multiple files for consistency and clarity. - Improved error handling and logging in service methods to enhance debugging capabilities. - Streamlined utility functions for better performance and maintainability across the domain packages.
39 lines
999 B
TypeScript
39 lines
999 B
TypeScript
/**
|
|
* Billing Domain - Contract
|
|
*
|
|
* Constants and types for the billing domain.
|
|
* All validated types are derived from schemas (see schema.ts).
|
|
*/
|
|
|
|
// ============================================================================
|
|
// Invoice Status Constants
|
|
// ============================================================================
|
|
|
|
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,
|
|
InvoiceItem,
|
|
Invoice,
|
|
InvoicePagination,
|
|
InvoiceList,
|
|
InvoiceSsoLink,
|
|
PaymentInvoiceRequest,
|
|
BillingSummary,
|
|
InvoiceQueryParams,
|
|
InvoiceListQuery,
|
|
} from "./schema.js";
|