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

59 lines
1.8 KiB
TypeScript

/**
* Address Domain - Constants
*
* Field length limits for address validation.
* These limits ensure composed values fit within WHMCS API constraints.
*/
// ============================================================================
// WHMCS Address Field Limits
// ============================================================================
/**
* Maximum lengths for WHMCS address API fields.
* These are the hard limits imposed by the WHMCS system.
*/
export const WHMCS_ADDRESS_LIMITS = {
/** Maximum length for address1 field (building + room) */
ADDRESS1_MAX: 200,
/** Maximum length for address2 field (town + street address) */
ADDRESS2_MAX: 200,
/** Maximum length for city field */
CITY_MAX: 100,
/** Maximum length for state field */
STATE_MAX: 100,
} as const;
// ============================================================================
// Input Field Limits
// ============================================================================
/**
* Maximum lengths for user input fields.
* Calculated to ensure composed values fit within WHMCS limits.
*
* Building + Room composition for WHMCS address1:
* - "Building Name Room123" = buildingName + " " + roomNumber
* - Max: 169 + 1 (space) + 30 = 200 chars
*/
export const ADDRESS_INPUT_LIMITS = {
/**
* Building name max length (169 chars).
* Calculation: WHMCS_ADDRESS1_MAX(200) - space(1) - ROOM_NUMBER_MAX(30) = 169
*/
BUILDING_NAME_MAX: 169,
/**
* Room number max length (30 chars).
* Allows for long format like "Room 2051-A-Special"
*/
ROOM_NUMBER_MAX: 30,
/**
* Street address max length (20 chars).
* Format: chome-banchi-go (e.g., "99-999-999")
* Already enforced by streetAddressDetailSchema regex.
*/
STREET_ADDRESS_MAX: 20,
} as const;