/**
 * 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,
  type AuthErrorCode,
  type TokenTypeValue,
  type GenderValue,
} from "./contract";

export type {
  // Request types
  LoginRequest,
  SignupRequest,
  PasswordResetRequest,
  ResetPasswordRequest,
  SetPasswordRequest,
  ChangePasswordRequest,
  LinkWhmcsRequest,
  ValidateSignupRequest,
  UpdateCustomerProfileRequest,
  AccountStatusRequest,
  SsoLinkRequest,
  CheckPasswordNeededRequest,
  RefreshTokenRequest,
  // Token types
  AuthTokens,
  // Response types
  AuthResponse,
  SignupResult,
  PasswordChangeResult,
  SsoLinkResponse,
  CheckPasswordNeededResponse,
  LinkWhmcsResponse,
  // Error types
  AuthError,
} from "./contract";

// ============================================================================
// Schemas (for validation)
// ============================================================================

export {
  // Request schemas
  loginRequestSchema,
  signupInputSchema,  // Base input schema for forms
  signupRequestSchema,
  passwordResetRequestSchema,
  passwordResetSchema,
  setPasswordRequestSchema,
  changePasswordRequestSchema,
  linkWhmcsRequestSchema,
  validateSignupRequestSchema,
  updateCustomerProfileRequestSchema,
  updateProfileRequestSchema,
  updateAddressRequestSchema,
  accountStatusRequestSchema,
  ssoLinkRequestSchema,
  checkPasswordNeededRequestSchema,
  refreshTokenRequestSchema,
  
  // Token schemas
  authTokensSchema,
  
  // Response schemas
  authResponseSchema,
  signupResultSchema,
  passwordChangeResultSchema,
  ssoLinkResponseSchema,
  checkPasswordNeededResponseSchema,
  linkWhmcsResponseSchema,
} from "./schema";

export { buildSignupRequest } from "./helpers";
