- 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.
128 lines
3.1 KiB
TypeScript
128 lines
3.1 KiB
TypeScript
/**
|
|
* Auth Domain
|
|
*
|
|
* Contains ONLY authentication mechanisms:
|
|
* - Login, Signup, Password Management
|
|
* - Token Management (JWT)
|
|
* - MFA, SSO
|
|
*
|
|
* User entity types are in customer domain (@customer-portal/domain/customer)
|
|
*/
|
|
|
|
// ============================================================================
|
|
// Constants & Contract Types
|
|
// ============================================================================
|
|
|
|
export {
|
|
AUTH_ERROR_CODE,
|
|
TOKEN_TYPE,
|
|
GENDER,
|
|
PASSWORD_RESET_CONFIG,
|
|
OTP_CONFIG,
|
|
type AuthErrorCode,
|
|
type TokenTypeValue,
|
|
type GenderValue,
|
|
} from "./contract.js";
|
|
|
|
export type {
|
|
// Request types
|
|
LoginRequest,
|
|
SignupRequest,
|
|
PasswordResetRequest,
|
|
ResetPasswordRequest,
|
|
SetPasswordRequest,
|
|
ChangePasswordRequest,
|
|
LinkWhmcsRequest,
|
|
ValidateSignupRequest,
|
|
UpdateCustomerProfileRequest,
|
|
AccountStatusRequest,
|
|
SsoLinkRequest,
|
|
CheckPasswordNeededRequest,
|
|
RefreshTokenRequest,
|
|
LoginVerifyOtpRequest,
|
|
// Token types
|
|
AuthTokens,
|
|
AuthSession,
|
|
PasswordResetTokenPayload,
|
|
// Response types
|
|
AuthResponse,
|
|
SignupResult,
|
|
PasswordChangeResult,
|
|
SsoLinkResponse,
|
|
CheckPasswordNeededResponse,
|
|
LinkWhmcsResponse,
|
|
LoginOtpRequiredResponse,
|
|
LoginResponse,
|
|
// Error types
|
|
AuthError,
|
|
} from "./contract.js";
|
|
|
|
// ============================================================================
|
|
// Schemas (for validation)
|
|
// ============================================================================
|
|
|
|
export {
|
|
// Request schemas
|
|
loginRequestSchema,
|
|
signupInputSchema,
|
|
signupRequestSchema,
|
|
passwordResetRequestSchema,
|
|
passwordResetSchema,
|
|
setPasswordRequestSchema,
|
|
changePasswordRequestSchema,
|
|
linkWhmcsRequestSchema,
|
|
validateSignupRequestSchema,
|
|
updateCustomerProfileRequestSchema,
|
|
updateProfileRequestSchema,
|
|
updateAddressRequestSchema,
|
|
accountStatusRequestSchema,
|
|
ssoLinkRequestSchema,
|
|
checkPasswordNeededRequestSchema,
|
|
refreshTokenRequestSchema,
|
|
loginVerifyOtpRequestSchema,
|
|
|
|
// Token schemas
|
|
authTokensSchema,
|
|
authSessionSchema,
|
|
passwordResetTokenPayloadSchema,
|
|
|
|
// Response schemas
|
|
authResponseSchema,
|
|
signupResultSchema,
|
|
passwordChangeResultSchema,
|
|
ssoLinkResponseSchema,
|
|
checkPasswordNeededResponseSchema,
|
|
linkWhmcsResponseSchema,
|
|
loginOtpRequiredResponseSchema,
|
|
loginResponseSchema,
|
|
} from "./schema.js";
|
|
|
|
export { buildSignupRequest } from "./helpers.js";
|
|
|
|
// ============================================================================
|
|
// Password Utilities
|
|
// ============================================================================
|
|
|
|
export {
|
|
PASSWORD_REQUIREMENTS,
|
|
checkPasswordStrength,
|
|
getPasswordStrengthDisplay,
|
|
MIGRATION_TRANSFER_ITEMS,
|
|
MIGRATION_STEPS,
|
|
type PasswordRequirementKey,
|
|
} from "./forms.js";
|
|
|
|
// ============================================================================
|
|
// RBAC Permissions
|
|
// ============================================================================
|
|
|
|
export {
|
|
PERMISSIONS,
|
|
ROLE_PERMISSIONS,
|
|
hasPermission,
|
|
hasAnyPermission,
|
|
hasAllPermissions,
|
|
getPermissionsForRole,
|
|
type Permission,
|
|
} from "./permissions.js";
|