barsa d5e22f14f5 feat: add address reconciliation queue service for Salesforce integration
- Implement AddressReconcileQueueService to handle address reconciliation jobs between WHMCS and Salesforce.
- Define job data structure and queue configuration for retries and error handling.
- Add methods for enqueueing reconciliation jobs and retrieving queue health metrics.

feat: create loading components for various services in the portal

- Add loading skeletons for Internet, SIM, VPN, and public services configuration.
- Implement loading states for account-related views including account details, services, and verification settings.
- Introduce loading states for support case details and subscription actions.

feat: implement OTP input component for user verification

- Create OtpInput component to handle 6-digit OTP input with auto-focus and navigation.
- Add LoginOtpStep component for OTP verification during login, including countdown timer and error handling.

feat: define address domain constants for validation

- Establish constants for address field length limits to ensure compliance with WHMCS API constraints.
- Include maximum lengths for address fields and user input fields to maintain data integrity.
2026-02-03 11:48:49 +09:00

56 lines
1.4 KiB
TypeScript

/**
* Billing Domain - Constants
*
* Domain constants for billing validation and business rules.
*/
import type { Currency } from "./schema.js";
// ============================================================================
// Currency Defaults
// ============================================================================
/**
* Single fallback currency for both BFF and Portal when WHMCS currency data
* is unavailable. This ensures a single source of truth for default currency
* formatting behaviour.
*/
export const FALLBACK_CURRENCY: Currency = {
id: 1,
code: "JPY",
prefix: "¥",
suffix: "",
format: "1",
rate: "1.00000",
};
// ============================================================================
// Invoice Validation Constants
// ============================================================================
/**
* Pagination limits for invoice queries
*/
export const INVOICE_PAGINATION = {
MIN_LIMIT: 1,
MAX_LIMIT: 100,
DEFAULT_LIMIT: 10,
DEFAULT_PAGE: 1,
} as const;
/**
* Valid statuses for WHMCS GetInvoices API filtering.
*
* WHMCS only supports these 5 statuses for list queries.
* Draft, Pending, Refunded exist on invoices but cannot be used as query filters.
*
* @see INVOICE_STATUS in contract.ts for all possible invoice statuses
*/
export const VALID_INVOICE_QUERY_STATUSES = [
"Paid",
"Unpaid",
"Cancelled",
"Overdue",
"Collections",
] as const;