> ## Documentation Index
> Fetch the complete documentation index at: https://camarauth-docs.camarai.es/llms.txt
> Use this file to discover all available pages before exploring further.

# User (Backend)

> Modelo de usuario retornado por el backend de Camarauth

# User (Backend)

Modelo base de usuario que el backend devuelve al autenticar una sesion.

## Estructura

```typescript theme={null}
interface User {
  id: string;
  name: string;
  surname?: string;
  phone: string;
  email?: string;
  roles: string[];
  [key: string]: unknown;
}
```

## Campos principales

### id

Identificador unico del usuario.

```typescript theme={null}
id: string;
```

### name

Nombre mostrado del usuario.

```typescript theme={null}
name: string;
```

### surname

Apellido opcional.

```typescript theme={null}
surname?: string;
```

### phone

Telefono en formato internacional E.164.

```typescript theme={null}
phone: string;
```

### email

Correo electronico opcional.

```typescript theme={null}
email?: string;
```

### roles

Lista de roles asignados.

```typescript theme={null}
roles: string[];
```

## Ejemplo

```json theme={null}
{
  "id": "123",
  "name": "Juan",
  "surname": "Perez",
  "phone": "+1234567890",
  "email": "juan@example.com",
  "roles": ["user", "premium"]
}
```

## Vease tambien

* [AuthResponse](/backend/interfaces/auth-response)
* [PinData](/backend/interfaces/pin-data)
