# UserApi

All URIs are relative to *http://localhost:8080/api/v1*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**usersByUsernameUsernameGet**](#usersbyusernameusernameget) | **GET** /users/by-username/{username} | Get Profile by Username|
|[**usersGet**](#usersget) | **GET** /users | List Users|
|[**usersIdCompletionGet**](#usersidcompletionget) | **GET** /users/{id}/completion | Get Profile Completion|
|[**usersIdDelete**](#usersiddelete) | **DELETE** /users/{id} | Delete user|
|[**usersIdGet**](#usersidget) | **GET** /users/{id} | Get Profile by ID|
|[**usersIdPut**](#usersidput) | **PUT** /users/{id} | Update Profile|

# **usersByUsernameUsernameGet**
> UsersIdGet200Response usersByUsernameUsernameGet()

Get public profile information for a user by username

### Example

```typescript
import {
    UserApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new UserApi(configuration);

let username: string; //Username (default to undefined)

const { status, data } = await apiInstance.usersByUsernameUsernameGet(
    username
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **username** | [**string**] | Username | defaults to undefined|


### Return type

**UsersIdGet200Response**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Missing username |  -  |
|**404** | User not found |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **usersGet**
> UsersGet200Response usersGet()

Get a paginated list of users with optional filtering

### Example

```typescript
import {
    UserApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new UserApi(configuration);

let page: number; //Page number (optional) (default to 1)
let limit: number; //Items per page (optional) (default to 20)
let role: string; //Filter by role (optional) (default to undefined)
let isActive: boolean; //Filter by active status (optional) (default to undefined)
let isVerified: boolean; //Filter by verified status (optional) (default to undefined)
let search: string; //Search by username, email, first_name, last_name (optional) (default to undefined)
let sortBy: string; //Sort field (created_at, username, email, last_login_at) (optional) (default to 'created_at')
let sortOrder: string; //Sort order (asc, desc) (optional) (default to 'desc')

const { status, data } = await apiInstance.usersGet(
    page,
    limit,
    role,
    isActive,
    isVerified,
    search,
    sortBy,
    sortOrder
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **limit** | [**number**] | Items per page | (optional) defaults to 20|
| **role** | [**string**] | Filter by role | (optional) defaults to undefined|
| **isActive** | [**boolean**] | Filter by active status | (optional) defaults to undefined|
| **isVerified** | [**boolean**] | Filter by verified status | (optional) defaults to undefined|
| **search** | [**string**] | Search by username, email, first_name, last_name | (optional) defaults to undefined|
| **sortBy** | [**string**] | Sort field (created_at, username, email, last_login_at) | (optional) defaults to 'created_at'|
| **sortOrder** | [**string**] | Sort order (asc, desc) | (optional) defaults to 'desc'|


### Return type

**UsersGet200Response**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**500** | Internal Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **usersIdCompletionGet**
> AuthMeGet200Response usersIdCompletionGet()

Get profile completion percentage and missing fields

### Example

```typescript
import {
    UserApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new UserApi(configuration);

let id: string; //User ID (default to undefined)

const { status, data } = await apiInstance.usersIdCompletionGet(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | User ID | defaults to undefined|


### Return type

**AuthMeGet200Response**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid ID |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **usersIdDelete**
> InternalHandlersAPIResponse usersIdDelete()

Soft delete a user (only user owner or admin can delete)

### Example

```typescript
import {
    UserApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new UserApi(configuration);

let id: string; //User ID (default to undefined)

const { status, data } = await apiInstance.usersIdDelete(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | User ID | defaults to undefined|


### Return type

**InternalHandlersAPIResponse**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | User deleted successfully |  -  |
|**400** | Invalid ID |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden - Not user owner or admin |  -  |
|**404** | User not found |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **usersIdGet**
> UsersIdGet200Response usersIdGet()

Get public profile information for a user

### Example

```typescript
import {
    UserApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new UserApi(configuration);

let id: string; //User ID (default to undefined)

const { status, data } = await apiInstance.usersIdGet(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | User ID | defaults to undefined|


### Return type

**UsersIdGet200Response**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid ID |  -  |
|**404** | User not found |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **usersIdPut**
> UsersIdGet200Response usersIdPut(profile)

Update user profile details

### Example

```typescript
import {
    UserApi,
    Configuration,
    InternalHandlersUpdateProfileRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new UserApi(configuration);

let id: string; //User ID (default to undefined)
let profile: InternalHandlersUpdateProfileRequest; //Profile Data

const { status, data } = await apiInstance.usersIdPut(
    id,
    profile
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **profile** | **InternalHandlersUpdateProfileRequest**| Profile Data | |
| **id** | [**string**] | User ID | defaults to undefined|


### Return type

**UsersIdGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Validation Error |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

