You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-05 06:00:24 +02:00
83
mobile/openapi/lib/api/users_admin_api.dart
generated
83
mobile/openapi/lib/api/users_admin_api.dart
generated
@ -211,6 +211,76 @@ class UsersAdminApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /admin/users/{id}/statistics' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
///
|
||||
/// * [AssetVisibility] visibility:
|
||||
Future<Response> getUserStatisticsAdminWithHttpInfo(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users/{id}/statistics'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (isFavorite != null) {
|
||||
queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
|
||||
}
|
||||
if (isTrashed != null) {
|
||||
queryParams.addAll(_queryParams('', 'isTrashed', isTrashed));
|
||||
}
|
||||
if (visibility != null) {
|
||||
queryParams.addAll(_queryParams('', 'visibility', visibility));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [bool] isFavorite:
|
||||
///
|
||||
/// * [bool] isTrashed:
|
||||
///
|
||||
/// * [AssetVisibility] visibility:
|
||||
Future<AssetStatsResponseDto?> getUserStatisticsAdmin(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, }) async {
|
||||
final response = await getUserStatisticsAdminWithHttpInfo(id, isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetStatsResponseDto',) as AssetStatsResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /admin/users/{id}/restore' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
@ -262,8 +332,10 @@ class UsersAdminApi {
|
||||
/// Performs an HTTP 'GET /admin/users' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id:
|
||||
///
|
||||
/// * [bool] withDeleted:
|
||||
Future<Response> searchUsersAdminWithHttpInfo({ bool? withDeleted, }) async {
|
||||
Future<Response> searchUsersAdminWithHttpInfo({ String? id, bool? withDeleted, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/users';
|
||||
|
||||
@ -274,6 +346,9 @@ class UsersAdminApi {
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (id != null) {
|
||||
queryParams.addAll(_queryParams('', 'id', id));
|
||||
}
|
||||
if (withDeleted != null) {
|
||||
queryParams.addAll(_queryParams('', 'withDeleted', withDeleted));
|
||||
}
|
||||
@ -294,9 +369,11 @@ class UsersAdminApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id:
|
||||
///
|
||||
/// * [bool] withDeleted:
|
||||
Future<List<UserAdminResponseDto>?> searchUsersAdmin({ bool? withDeleted, }) async {
|
||||
final response = await searchUsersAdminWithHttpInfo( withDeleted: withDeleted, );
|
||||
Future<List<UserAdminResponseDto>?> searchUsersAdmin({ String? id, bool? withDeleted, }) async {
|
||||
final response = await searchUsersAdminWithHttpInfo( id: id, withDeleted: withDeleted, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
Reference in New Issue
Block a user