/** * Admin Update User Attributes DTO * * Request DTO for administrators to update a user's profile information. * * Security: * - Requires target user sub (UUID) * - All fields validated according to UserUpdateDTO rules * - Uniqueness constraints enforced * * @example * ```typescript * const result = await adminAuthService.updateUserAttributes({ * sub: 'user-uuid', * username: 'newusername', * firstName: 'John', * lastName: 'Doe', * }); * ``` */ import { UserUpdateDTO } from './user-update.dto'; /** * Request DTO for admin updating user attributes (includes sub) */ export declare class AdminUpdateUserAttributesDTO extends UserUpdateDTO { /** * User's unique identifier (UUID v4) * * Validation: * - Must be a valid UUID v4 format * - Matches DB constraint: char(36) or uuid * * Sanitization: * - Trimmed * - Lowercased for consistency * * @example "a21b654c-2746-4168-acee-c175083a65cd" */ sub: string; /** * Optional flag to retain verification status when updating email/phone. * * ADMIN-ONLY: this flag intentionally lives on the admin DTO and not on the shared * base, because keeping an email/phone flagged verified while changing it is a * privileged action. See the note in {@link UserUpdateDTO}. * * When true: * - Email verification status is preserved when email is updated * - Phone verification status is preserved when phone is updated * - Useful when verification was done externally or outside nauth-toolkit * * When false or undefined (default): * - Email verification is reset to false when email is updated * - Phone verification is reset to false when phone is updated * - User must re-verify the new email/phone * * @example * ```typescript * // Admin updates a user's email but keeps verification (external verification) * await adminAuthService.updateUserAttributes({ * sub: 'user-uuid', * email: 'new@example.com', * retainVerification: true, * }); * ``` */ retainVerification?: boolean; } //# sourceMappingURL=admin-update-user-attributes.dto.d.ts.map