/** * Verify Phone with Code DTO * * Used for phone verification with 6-digit OTP code. * * Security: * - Phone validated against E.164 format (prevents SQL injection) * - Code validated for exact 6 digits * - All fields match DB constraints * * @example * ```typescript * POST /auth/verify-phone/verify * { * "phone": "+1234567890", * "code": "123456" * } * ``` */ export declare class VerifyPhoneWithCodeDTO { /** * User's phone number in E.164 format * * Validation: * - Must be a string * - Must match E.164 format: +[country code][number] * - Max 20 characters (matches DB constraint: varchar(20)) * * Sanitization: * - Trimmed * - Whitespace removed * * @example "+1234567890" */ phone: string; /** * 6-digit verification code * * Validation: * - Must be a string * - Exactly 6 digits (numeric only) * - No letters, spaces, or special characters * - Fixed length prevents timing attacks * * Sanitization: * - Removes all whitespace (users might copy "123 456") * - Ensures only numeric string * * @example "123456" */ code: string; /** * Challenge session ID (internal use) * Optional - used internally to link verification to specific challenge session. * Provides security by ensuring codes are only valid for the session they were created for. * * Validation: * - Must be a positive integer if provided * - Optional (for backward compatibility and direct verification flows) */ challengeSessionId?: number; } /** * DTO for sending verification SMS * * Security: * - User sub validated as UUID v4 * - Skip flag is boolean (prevents injection) */ export declare class SendVerificationSMSDTO { /** * User identifier (UUID v4) * * Validation: * - Must be valid UUID v4 format * * Sanitization: * - Trimmed and lowercased */ sub: string; /** * Skip the "already verified" check * Used for MFA contexts where codes are needed even if phone is verified * * Validation: * - Must be boolean * - Optional (defaults to true) */ skipAlreadyVerifiedCheck?: boolean; /** * Challenge session ID to link this verification token to * Optional - for linking verification tokens to specific challenge sessions. * Provides security by preventing old tokens from being used with new sessions. * * Validation: * - Must be a positive integer * - Optional (for backward compatibility and non-challenge flows) */ challengeSessionId?: number; } /** * Response DTO for sendVerificationSMS */ export declare class SendVerificationSMSResponseDTO { /** * Verification token ID (internal integer) */ tokenId: number; } /** * Response DTO for verifyPhoneWithCode and verifyPhoneWithCodeBySub */ export declare class VerifyPhoneResponseDTO { /** * Success message */ message: string; } /** * DTO for resending verification SMS * * Supports both sub and phone-based resend * * Security: * - Either sub or phone must be provided (conditional validation) * - Rate limiting applied in service layer * - Input sanitization prevents abuse */ export declare class ResendVerificationSMSDTO { /** * User identifier (UUID v4) - optional if phone provided * * Validation: * - Must be valid UUID v4 format if provided * - Required if phone is not provided * * Sanitization: * - Trimmed and lowercased */ sub?: string; /** * User's phone number - optional if sub provided * * Validation: * - Must match E.164 format if provided * - Max 20 characters (DB limit) * - Required if sub is not provided * * Sanitization: * - Whitespace removed */ phone?: string; } /** * Response DTO for resendVerificationSMS */ export declare class ResendVerificationSMSResponseDTO { /** * Verification token ID (internal integer) */ tokenId: number; } //# sourceMappingURL=verify-phone.dto.d.ts.map