AdminUpdateUserAttributesDTO
Package: @nauth-toolkit/core
Type: DTO (Request/Response)
Data transfer objects for admin-initiated user profile updates. Extends UserUpdateDTO with required sub field.
- NestJS
- Express
- Fastify
import { AdminUpdateUserAttributesDTO, UserResponseDTO } from '@nauth-toolkit/nestjs';
import { AdminUpdateUserAttributesDTO, UserResponseDTO } from '@nauth-toolkit/core';
import { AdminUpdateUserAttributesDTO, UserResponseDTO } from '@nauth-toolkit/core';
AdminUpdateUserAttributesDTO (Request)
| Property | Type | Required | Description |
|---|---|---|---|
sub | string | Yes | User sub (UUID v4). Trimmed, lowercased for consistency. |
username | string | No | Username. 3-255 characters. Alphanumeric, underscores, and hyphens only. |
firstName | string | No | First name. 1-100 characters. Trimmed. |
lastName | string | No | Last name. 1-100 characters. Trimmed. |
email | string | No | Email address. Valid email format. |
phone | string | No | Phone number. E.164 format. |
metadata | object | No | Custom metadata. Merged with existing metadata. Set key to null to delete. |
preferredMfaMethod | string | No | Preferred MFA method. One of: totp, sms, email, passkey. |
retainVerification | boolean | No | Whether to retain email/phone verification status when updating email/phone. Default: false. |
UserResponseDTO (Response)
Returns the updated user object. See UserResponseDTO for full structure.
Example
{
"sub": "a21b654c-2746-4168-acee-c175083a65cd",
"username": "newusername",
"firstName": "John",
"lastName": "Doe",
"metadata": {
"department": "Engineering",
"role": "Senior Developer"
}
}