feat: groups
This commit is contained in:
32
mobile/openapi/README.md
generated
32
mobile/openapi/README.md
generated
@@ -83,14 +83,18 @@ Class | Method | HTTP request | Description
|
||||
*ActivitiesApi* | [**getActivities**](doc//ActivitiesApi.md#getactivities) | **GET** /activities |
|
||||
*ActivitiesApi* | [**getActivityStatistics**](doc//ActivitiesApi.md#getactivitystatistics) | **GET** /activities/statistics |
|
||||
*AlbumsApi* | [**addAssetsToAlbum**](doc//AlbumsApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets |
|
||||
*AlbumsApi* | [**addGroupsToAlbum**](doc//AlbumsApi.md#addgroupstoalbum) | **PUT** /albums/{id}/groups |
|
||||
*AlbumsApi* | [**addUsersToAlbum**](doc//AlbumsApi.md#adduserstoalbum) | **PUT** /albums/{id}/users |
|
||||
*AlbumsApi* | [**createAlbum**](doc//AlbumsApi.md#createalbum) | **POST** /albums |
|
||||
*AlbumsApi* | [**deleteAlbum**](doc//AlbumsApi.md#deletealbum) | **DELETE** /albums/{id} |
|
||||
*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} |
|
||||
*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics |
|
||||
*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums |
|
||||
*AlbumsApi* | [**getGroupsForAlbum**](doc//AlbumsApi.md#getgroupsforalbum) | **GET** /albums/{id}/groups |
|
||||
*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets |
|
||||
*AlbumsApi* | [**removeGroupsFromAlbum**](doc//AlbumsApi.md#removegroupsfromalbum) | **DELETE** /albums/{id}/groups |
|
||||
*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} |
|
||||
*AlbumsApi* | [**updateAlbumGroup**](doc//AlbumsApi.md#updatealbumgroup) | **PUT** /albums/{id}/groups/{groupId} |
|
||||
*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} |
|
||||
*AlbumsApi* | [**updateAlbumUser**](doc//AlbumsApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} |
|
||||
*AssetsApi* | [**checkBulkUpload**](doc//AssetsApi.md#checkbulkupload) | **POST** /assets/bulk-upload-check | checkBulkUpload
|
||||
@@ -129,6 +133,19 @@ Class | Method | HTTP request | Description
|
||||
*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} |
|
||||
*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces |
|
||||
*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} |
|
||||
*GroupsApi* | [**getMyGroup**](doc//GroupsApi.md#getmygroup) | **GET** /groups/{id} |
|
||||
*GroupsApi* | [**getMyGroupUsers**](doc//GroupsApi.md#getmygroupusers) | **GET** /groups/{id}/users |
|
||||
*GroupsApi* | [**leaveMyGroup**](doc//GroupsApi.md#leavemygroup) | **DELETE** /groups/{id} |
|
||||
*GroupsApi* | [**searchMyGroups**](doc//GroupsApi.md#searchmygroups) | **GET** /groups |
|
||||
*GroupsAdminApi* | [**addUsersToGroupAdmin**](doc//GroupsAdminApi.md#adduserstogroupadmin) | **PUT** /admin/groups/{id}/users |
|
||||
*GroupsAdminApi* | [**createGroupAdmin**](doc//GroupsAdminApi.md#creategroupadmin) | **POST** /admin/groups |
|
||||
*GroupsAdminApi* | [**deleteGroupAdmin**](doc//GroupsAdminApi.md#deletegroupadmin) | **DELETE** /admin/groups/{id} |
|
||||
*GroupsAdminApi* | [**getGroupAdmin**](doc//GroupsAdminApi.md#getgroupadmin) | **GET** /admin/groups/{id} |
|
||||
*GroupsAdminApi* | [**getUsersForGroupAdmin**](doc//GroupsAdminApi.md#getusersforgroupadmin) | **GET** /admin/groups/{id}/users |
|
||||
*GroupsAdminApi* | [**removeUserFromGroupAdmin**](doc//GroupsAdminApi.md#removeuserfromgroupadmin) | **DELETE** /admin/groups/{id}/user/{userId} |
|
||||
*GroupsAdminApi* | [**removeUsersFromGroupAdmin**](doc//GroupsAdminApi.md#removeusersfromgroupadmin) | **DELETE** /admin/groups/{id}/user |
|
||||
*GroupsAdminApi* | [**searchGroupsAdmin**](doc//GroupsAdminApi.md#searchgroupsadmin) | **GET** /admin/groups |
|
||||
*GroupsAdminApi* | [**updateGroupAdmin**](doc//GroupsAdminApi.md#updategroupadmin) | **PUT** /admin/groups/{id} |
|
||||
*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs |
|
||||
*JobsApi* | [**getAllJobsStatus**](doc//JobsApi.md#getalljobsstatus) | **GET** /jobs |
|
||||
*JobsApi* | [**sendJobCommand**](doc//JobsApi.md#sendjobcommand) | **PUT** /jobs/{id} |
|
||||
@@ -292,6 +309,12 @@ Class | Method | HTTP request | Description
|
||||
- [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md)
|
||||
- [AddUsersDto](doc//AddUsersDto.md)
|
||||
- [AdminOnboardingUpdateDto](doc//AdminOnboardingUpdateDto.md)
|
||||
- [AlbumGroupCreateAllDto](doc//AlbumGroupCreateAllDto.md)
|
||||
- [AlbumGroupDeleteAllDto](doc//AlbumGroupDeleteAllDto.md)
|
||||
- [AlbumGroupDto](doc//AlbumGroupDto.md)
|
||||
- [AlbumGroupMetadata](doc//AlbumGroupMetadata.md)
|
||||
- [AlbumGroupResponseDto](doc//AlbumGroupResponseDto.md)
|
||||
- [AlbumGroupUpdateDto](doc//AlbumGroupUpdateDto.md)
|
||||
- [AlbumResponseDto](doc//AlbumResponseDto.md)
|
||||
- [AlbumStatisticsResponseDto](doc//AlbumStatisticsResponseDto.md)
|
||||
- [AlbumUserAddDto](doc//AlbumUserAddDto.md)
|
||||
@@ -360,6 +383,15 @@ Class | Method | HTTP request | Description
|
||||
- [FacialRecognitionConfig](doc//FacialRecognitionConfig.md)
|
||||
- [FoldersResponse](doc//FoldersResponse.md)
|
||||
- [FoldersUpdate](doc//FoldersUpdate.md)
|
||||
- [GroupAdminCreateDto](doc//GroupAdminCreateDto.md)
|
||||
- [GroupAdminResponseDto](doc//GroupAdminResponseDto.md)
|
||||
- [GroupAdminUpdateDto](doc//GroupAdminUpdateDto.md)
|
||||
- [GroupResponseDto](doc//GroupResponseDto.md)
|
||||
- [GroupUserCreateAllDto](doc//GroupUserCreateAllDto.md)
|
||||
- [GroupUserDeleteAllDto](doc//GroupUserDeleteAllDto.md)
|
||||
- [GroupUserDto](doc//GroupUserDto.md)
|
||||
- [GroupUserMetadata](doc//GroupUserMetadata.md)
|
||||
- [GroupUserResponseDto](doc//GroupUserResponseDto.md)
|
||||
- [ImageFormat](doc//ImageFormat.md)
|
||||
- [JobCommand](doc//JobCommand.md)
|
||||
- [JobCommandDto](doc//JobCommandDto.md)
|
||||
|
||||
17
mobile/openapi/lib/api.dart
generated
17
mobile/openapi/lib/api.dart
generated
@@ -39,6 +39,8 @@ part 'api/deprecated_api.dart';
|
||||
part 'api/download_api.dart';
|
||||
part 'api/duplicates_api.dart';
|
||||
part 'api/faces_api.dart';
|
||||
part 'api/groups_api.dart';
|
||||
part 'api/groups_admin_api.dart';
|
||||
part 'api/jobs_api.dart';
|
||||
part 'api/libraries_api.dart';
|
||||
part 'api/map_api.dart';
|
||||
@@ -72,6 +74,12 @@ part 'model/activity_response_dto.dart';
|
||||
part 'model/activity_statistics_response_dto.dart';
|
||||
part 'model/add_users_dto.dart';
|
||||
part 'model/admin_onboarding_update_dto.dart';
|
||||
part 'model/album_group_create_all_dto.dart';
|
||||
part 'model/album_group_delete_all_dto.dart';
|
||||
part 'model/album_group_dto.dart';
|
||||
part 'model/album_group_metadata.dart';
|
||||
part 'model/album_group_response_dto.dart';
|
||||
part 'model/album_group_update_dto.dart';
|
||||
part 'model/album_response_dto.dart';
|
||||
part 'model/album_statistics_response_dto.dart';
|
||||
part 'model/album_user_add_dto.dart';
|
||||
@@ -140,6 +148,15 @@ part 'model/face_dto.dart';
|
||||
part 'model/facial_recognition_config.dart';
|
||||
part 'model/folders_response.dart';
|
||||
part 'model/folders_update.dart';
|
||||
part 'model/group_admin_create_dto.dart';
|
||||
part 'model/group_admin_response_dto.dart';
|
||||
part 'model/group_admin_update_dto.dart';
|
||||
part 'model/group_response_dto.dart';
|
||||
part 'model/group_user_create_all_dto.dart';
|
||||
part 'model/group_user_delete_all_dto.dart';
|
||||
part 'model/group_user_dto.dart';
|
||||
part 'model/group_user_metadata.dart';
|
||||
part 'model/group_user_response_dto.dart';
|
||||
part 'model/image_format.dart';
|
||||
part 'model/job_command.dart';
|
||||
part 'model/job_command_dto.dart';
|
||||
|
||||
227
mobile/openapi/lib/api/albums_api.dart
generated
227
mobile/openapi/lib/api/albums_api.dart
generated
@@ -91,6 +91,66 @@ class AlbumsApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumGroup.create` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AlbumGroupCreateAllDto] albumGroupCreateAllDto (required):
|
||||
Future<Response> addGroupsToAlbumWithHttpInfo(String id, AlbumGroupCreateAllDto albumGroupCreateAllDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/albums/{id}/groups'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = albumGroupCreateAllDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumGroup.create` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AlbumGroupCreateAllDto] albumGroupCreateAllDto (required):
|
||||
Future<List<AlbumGroupResponseDto>?> addGroupsToAlbum(String id, AlbumGroupCreateAllDto albumGroupCreateAllDto,) async {
|
||||
final response = await addGroupsToAlbumWithHttpInfo(id, albumGroupCreateAllDto,);
|
||||
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) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<AlbumGroupResponseDto>') as List)
|
||||
.cast<AlbumGroupResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumUser.create` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
@@ -432,6 +492,62 @@ class AlbumsApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumGroup.read` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getGroupsForAlbumWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/albums/{id}/groups'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumGroup.read` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<List<AlbumGroupResponseDto>?> getGroupsForAlbum(String id,) async {
|
||||
final response = await getGroupsForAlbumWithHttpInfo(id,);
|
||||
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) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<AlbumGroupResponseDto>') as List)
|
||||
.cast<AlbumGroupResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumAsset.delete` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
@@ -492,6 +608,55 @@ class AlbumsApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumGroup.delete` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AlbumGroupDeleteAllDto] albumGroupDeleteAllDto (required):
|
||||
Future<Response> removeGroupsFromAlbumWithHttpInfo(String id, AlbumGroupDeleteAllDto albumGroupDeleteAllDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/albums/{id}/groups'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = albumGroupDeleteAllDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumGroup.delete` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AlbumGroupDeleteAllDto] albumGroupDeleteAllDto (required):
|
||||
Future<void> removeGroupsFromAlbum(String id, AlbumGroupDeleteAllDto albumGroupDeleteAllDto,) async {
|
||||
final response = await removeGroupsFromAlbumWithHttpInfo(id, albumGroupDeleteAllDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumUser.delete` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
@@ -542,6 +707,68 @@ class AlbumsApi {
|
||||
}
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumGroup.update` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] groupId (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AlbumGroupUpdateDto] albumGroupUpdateDto (required):
|
||||
Future<Response> updateAlbumGroupWithHttpInfo(String groupId, String id, AlbumGroupUpdateDto albumGroupUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/albums/{id}/groups/{groupId}'
|
||||
.replaceAll('{groupId}', groupId)
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = albumGroupUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `albumGroup.update` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] groupId (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AlbumGroupUpdateDto] albumGroupUpdateDto (required):
|
||||
Future<AlbumGroupResponseDto?> updateAlbumGroup(String groupId, String id, AlbumGroupUpdateDto albumGroupUpdateDto,) async {
|
||||
final response = await updateAlbumGroupWithHttpInfo(groupId, id, albumGroupUpdateDto,);
|
||||
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), 'AlbumGroupResponseDto',) as AlbumGroupResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `album.update` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
|
||||
506
mobile/openapi/lib/api/groups_admin_api.dart
generated
Normal file
506
mobile/openapi/lib/api/groups_admin_api.dart
generated
Normal file
@@ -0,0 +1,506 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class GroupsAdminApi {
|
||||
GroupsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroupUser.create` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [GroupUserCreateAllDto] groupUserCreateAllDto (required):
|
||||
Future<Response> addUsersToGroupAdminWithHttpInfo(String id, GroupUserCreateAllDto groupUserCreateAllDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups/{id}/users'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = groupUserCreateAllDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroupUser.create` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [GroupUserCreateAllDto] groupUserCreateAllDto (required):
|
||||
Future<List<GroupUserResponseDto>?> addUsersToGroupAdmin(String id, GroupUserCreateAllDto groupUserCreateAllDto,) async {
|
||||
final response = await addUsersToGroupAdminWithHttpInfo(id, groupUserCreateAllDto,);
|
||||
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) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<GroupUserResponseDto>') as List)
|
||||
.cast<GroupUserResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.create` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [GroupAdminCreateDto] groupAdminCreateDto (required):
|
||||
Future<Response> createGroupAdminWithHttpInfo(GroupAdminCreateDto groupAdminCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = groupAdminCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.create` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [GroupAdminCreateDto] groupAdminCreateDto (required):
|
||||
Future<GroupAdminResponseDto?> createGroupAdmin(GroupAdminCreateDto groupAdminCreateDto,) async {
|
||||
final response = await createGroupAdminWithHttpInfo(groupAdminCreateDto,);
|
||||
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), 'GroupAdminResponseDto',) as GroupAdminResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.delete` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteGroupAdminWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.delete` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteGroupAdmin(String id,) async {
|
||||
final response = await deleteGroupAdminWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.read` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getGroupAdminWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.read` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<GroupAdminResponseDto?> getGroupAdmin(String id,) async {
|
||||
final response = await getGroupAdminWithHttpInfo(id,);
|
||||
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), 'GroupAdminResponseDto',) as GroupAdminResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroupUser.read` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getUsersForGroupAdminWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups/{id}/users'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroupUser.read` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<List<GroupUserResponseDto>?> getUsersForGroupAdmin(String id,) async {
|
||||
final response = await getUsersForGroupAdminWithHttpInfo(id,);
|
||||
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) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<GroupUserResponseDto>') as List)
|
||||
.cast<GroupUserResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `adminGroupUser.delete` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
Future<Response> removeUserFromGroupAdminWithHttpInfo(String id, String userId,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups/{id}/user/{userId}'
|
||||
.replaceAll('{id}', id)
|
||||
.replaceAll('{userId}', userId);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `adminGroupUser.delete` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
Future<void> removeUserFromGroupAdmin(String id, String userId,) async {
|
||||
final response = await removeUserFromGroupAdminWithHttpInfo(id, userId,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// This endpoint requires the `adminGroupUser.delete` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [GroupUserDeleteAllDto] groupUserDeleteAllDto (required):
|
||||
Future<Response> removeUsersFromGroupAdminWithHttpInfo(String id, GroupUserDeleteAllDto groupUserDeleteAllDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups/{id}/user'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = groupUserDeleteAllDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `adminGroupUser.delete` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [GroupUserDeleteAllDto] groupUserDeleteAllDto (required):
|
||||
Future<void> removeUsersFromGroupAdmin(String id, GroupUserDeleteAllDto groupUserDeleteAllDto,) async {
|
||||
final response = await removeUsersFromGroupAdminWithHttpInfo(id, groupUserDeleteAllDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.read` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id:
|
||||
///
|
||||
/// * [String] userId:
|
||||
Future<Response> searchGroupsAdminWithHttpInfo({ String? id, String? userId, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (id != null) {
|
||||
queryParams.addAll(_queryParams('', 'id', id));
|
||||
}
|
||||
if (userId != null) {
|
||||
queryParams.addAll(_queryParams('', 'userId', userId));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.read` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id:
|
||||
///
|
||||
/// * [String] userId:
|
||||
Future<List<GroupAdminResponseDto>?> searchGroupsAdmin({ String? id, String? userId, }) async {
|
||||
final response = await searchGroupsAdminWithHttpInfo( id: id, userId: userId, );
|
||||
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) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<GroupAdminResponseDto>') as List)
|
||||
.cast<GroupAdminResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.update` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [GroupAdminUpdateDto] groupAdminUpdateDto (required):
|
||||
Future<Response> updateGroupAdminWithHttpInfo(String id, GroupAdminUpdateDto groupAdminUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/admin/groups/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = groupAdminUpdateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `adminGroup.update` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [GroupAdminUpdateDto] groupAdminUpdateDto (required):
|
||||
Future<GroupAdminResponseDto?> updateGroupAdmin(String id, GroupAdminUpdateDto groupAdminUpdateDto,) async {
|
||||
final response = await updateGroupAdminWithHttpInfo(id, groupAdminUpdateDto,);
|
||||
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), 'GroupAdminResponseDto',) as GroupAdminResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
219
mobile/openapi/lib/api/groups_api.dart
generated
Normal file
219
mobile/openapi/lib/api/groups_api.dart
generated
Normal file
@@ -0,0 +1,219 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class GroupsApi {
|
||||
GroupsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// This endpoint requires the `group.read` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getMyGroupWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/groups/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `group.read` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<GroupResponseDto?> getMyGroup(String id,) async {
|
||||
final response = await getMyGroupWithHttpInfo(id,);
|
||||
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), 'GroupResponseDto',) as GroupResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `group.read` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getMyGroupUsersWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/groups/{id}/users'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint is an admin-only route, and requires the `group.read` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<List<GroupUserResponseDto>?> getMyGroupUsers(String id,) async {
|
||||
final response = await getMyGroupUsersWithHttpInfo(id,);
|
||||
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) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<GroupUserResponseDto>') as List)
|
||||
.cast<GroupUserResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This endpoint requires the `group.delete` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> leaveMyGroupWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/groups/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `group.delete` permission.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> leaveMyGroup(String id,) async {
|
||||
final response = await leaveMyGroupWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// This endpoint requires the `group.read` permission.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> searchMyGroupsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/groups';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This endpoint requires the `group.read` permission.
|
||||
Future<List<GroupResponseDto>?> searchMyGroups() async {
|
||||
final response = await searchMyGroupsWithHttpInfo();
|
||||
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) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<GroupResponseDto>') as List)
|
||||
.cast<GroupResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
30
mobile/openapi/lib/api_client.dart
generated
30
mobile/openapi/lib/api_client.dart
generated
@@ -200,6 +200,18 @@ class ApiClient {
|
||||
return AddUsersDto.fromJson(value);
|
||||
case 'AdminOnboardingUpdateDto':
|
||||
return AdminOnboardingUpdateDto.fromJson(value);
|
||||
case 'AlbumGroupCreateAllDto':
|
||||
return AlbumGroupCreateAllDto.fromJson(value);
|
||||
case 'AlbumGroupDeleteAllDto':
|
||||
return AlbumGroupDeleteAllDto.fromJson(value);
|
||||
case 'AlbumGroupDto':
|
||||
return AlbumGroupDto.fromJson(value);
|
||||
case 'AlbumGroupMetadata':
|
||||
return AlbumGroupMetadata.fromJson(value);
|
||||
case 'AlbumGroupResponseDto':
|
||||
return AlbumGroupResponseDto.fromJson(value);
|
||||
case 'AlbumGroupUpdateDto':
|
||||
return AlbumGroupUpdateDto.fromJson(value);
|
||||
case 'AlbumResponseDto':
|
||||
return AlbumResponseDto.fromJson(value);
|
||||
case 'AlbumStatisticsResponseDto':
|
||||
@@ -336,6 +348,24 @@ class ApiClient {
|
||||
return FoldersResponse.fromJson(value);
|
||||
case 'FoldersUpdate':
|
||||
return FoldersUpdate.fromJson(value);
|
||||
case 'GroupAdminCreateDto':
|
||||
return GroupAdminCreateDto.fromJson(value);
|
||||
case 'GroupAdminResponseDto':
|
||||
return GroupAdminResponseDto.fromJson(value);
|
||||
case 'GroupAdminUpdateDto':
|
||||
return GroupAdminUpdateDto.fromJson(value);
|
||||
case 'GroupResponseDto':
|
||||
return GroupResponseDto.fromJson(value);
|
||||
case 'GroupUserCreateAllDto':
|
||||
return GroupUserCreateAllDto.fromJson(value);
|
||||
case 'GroupUserDeleteAllDto':
|
||||
return GroupUserDeleteAllDto.fromJson(value);
|
||||
case 'GroupUserDto':
|
||||
return GroupUserDto.fromJson(value);
|
||||
case 'GroupUserMetadata':
|
||||
return GroupUserMetadata.fromJson(value);
|
||||
case 'GroupUserResponseDto':
|
||||
return GroupUserResponseDto.fromJson(value);
|
||||
case 'ImageFormat':
|
||||
return ImageFormatTypeTransformer().decode(value);
|
||||
case 'JobCommand':
|
||||
|
||||
99
mobile/openapi/lib/model/album_group_create_all_dto.dart
generated
Normal file
99
mobile/openapi/lib/model/album_group_create_all_dto.dart
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class AlbumGroupCreateAllDto {
|
||||
/// Returns a new [AlbumGroupCreateAllDto] instance.
|
||||
AlbumGroupCreateAllDto({
|
||||
this.groups = const [],
|
||||
});
|
||||
|
||||
List<AlbumGroupDto> groups;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupCreateAllDto &&
|
||||
_deepEquality.equals(other.groups, groups);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(groups.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumGroupCreateAllDto[groups=$groups]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'groups'] = this.groups;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AlbumGroupCreateAllDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumGroupCreateAllDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumGroupCreateAllDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AlbumGroupCreateAllDto(
|
||||
groups: AlbumGroupDto.listFromJson(json[r'groups']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AlbumGroupCreateAllDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumGroupCreateAllDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AlbumGroupCreateAllDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AlbumGroupCreateAllDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AlbumGroupCreateAllDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AlbumGroupCreateAllDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AlbumGroupCreateAllDto-objects as value to a dart map
|
||||
static Map<String, List<AlbumGroupCreateAllDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AlbumGroupCreateAllDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AlbumGroupCreateAllDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'groups',
|
||||
};
|
||||
}
|
||||
|
||||
101
mobile/openapi/lib/model/album_group_delete_all_dto.dart
generated
Normal file
101
mobile/openapi/lib/model/album_group_delete_all_dto.dart
generated
Normal file
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class AlbumGroupDeleteAllDto {
|
||||
/// Returns a new [AlbumGroupDeleteAllDto] instance.
|
||||
AlbumGroupDeleteAllDto({
|
||||
this.groupIds = const [],
|
||||
});
|
||||
|
||||
List<String> groupIds;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupDeleteAllDto &&
|
||||
_deepEquality.equals(other.groupIds, groupIds);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(groupIds.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumGroupDeleteAllDto[groupIds=$groupIds]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'groupIds'] = this.groupIds;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AlbumGroupDeleteAllDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumGroupDeleteAllDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumGroupDeleteAllDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AlbumGroupDeleteAllDto(
|
||||
groupIds: json[r'groupIds'] is Iterable
|
||||
? (json[r'groupIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AlbumGroupDeleteAllDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumGroupDeleteAllDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AlbumGroupDeleteAllDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AlbumGroupDeleteAllDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AlbumGroupDeleteAllDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AlbumGroupDeleteAllDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AlbumGroupDeleteAllDto-objects as value to a dart map
|
||||
static Map<String, List<AlbumGroupDeleteAllDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AlbumGroupDeleteAllDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AlbumGroupDeleteAllDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'groupIds',
|
||||
};
|
||||
}
|
||||
|
||||
116
mobile/openapi/lib/model/album_group_dto.dart
generated
Normal file
116
mobile/openapi/lib/model/album_group_dto.dart
generated
Normal file
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class AlbumGroupDto {
|
||||
/// Returns a new [AlbumGroupDto] instance.
|
||||
AlbumGroupDto({
|
||||
required this.groupId,
|
||||
this.role,
|
||||
});
|
||||
|
||||
String groupId;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
AlbumUserRole? role;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupDto &&
|
||||
other.groupId == groupId &&
|
||||
other.role == role;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(groupId.hashCode) +
|
||||
(role == null ? 0 : role!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumGroupDto[groupId=$groupId, role=$role]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'groupId'] = this.groupId;
|
||||
if (this.role != null) {
|
||||
json[r'role'] = this.role;
|
||||
} else {
|
||||
// json[r'role'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AlbumGroupDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumGroupDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumGroupDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AlbumGroupDto(
|
||||
groupId: mapValueOfType<String>(json, r'groupId')!,
|
||||
role: AlbumUserRole.fromJson(json[r'role']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AlbumGroupDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumGroupDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AlbumGroupDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AlbumGroupDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AlbumGroupDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AlbumGroupDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AlbumGroupDto-objects as value to a dart map
|
||||
static Map<String, List<AlbumGroupDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AlbumGroupDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AlbumGroupDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'groupId',
|
||||
};
|
||||
}
|
||||
|
||||
107
mobile/openapi/lib/model/album_group_metadata.dart
generated
Normal file
107
mobile/openapi/lib/model/album_group_metadata.dart
generated
Normal file
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class AlbumGroupMetadata {
|
||||
/// Returns a new [AlbumGroupMetadata] instance.
|
||||
AlbumGroupMetadata({
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
DateTime createdAt;
|
||||
|
||||
DateTime updatedAt;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupMetadata &&
|
||||
other.createdAt == createdAt &&
|
||||
other.updatedAt == updatedAt;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(createdAt.hashCode) +
|
||||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumGroupMetadata[createdAt=$createdAt, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
||||
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AlbumGroupMetadata] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumGroupMetadata? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumGroupMetadata");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AlbumGroupMetadata(
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AlbumGroupMetadata> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumGroupMetadata>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AlbumGroupMetadata.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AlbumGroupMetadata> mapFromJson(dynamic json) {
|
||||
final map = <String, AlbumGroupMetadata>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AlbumGroupMetadata.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AlbumGroupMetadata-objects as value to a dart map
|
||||
static Map<String, List<AlbumGroupMetadata>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AlbumGroupMetadata>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AlbumGroupMetadata.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'createdAt',
|
||||
'updatedAt',
|
||||
};
|
||||
}
|
||||
|
||||
127
mobile/openapi/lib/model/album_group_response_dto.dart
generated
Normal file
127
mobile/openapi/lib/model/album_group_response_dto.dart
generated
Normal file
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class AlbumGroupResponseDto {
|
||||
/// Returns a new [AlbumGroupResponseDto] instance.
|
||||
AlbumGroupResponseDto({
|
||||
required this.description,
|
||||
required this.id,
|
||||
required this.metadata,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
String? description;
|
||||
|
||||
String id;
|
||||
|
||||
AlbumGroupMetadata metadata;
|
||||
|
||||
String name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupResponseDto &&
|
||||
other.description == description &&
|
||||
other.id == id &&
|
||||
other.metadata == metadata &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(description == null ? 0 : description!.hashCode) +
|
||||
(id.hashCode) +
|
||||
(metadata.hashCode) +
|
||||
(name.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumGroupResponseDto[description=$description, id=$id, metadata=$metadata, name=$name]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.description != null) {
|
||||
json[r'description'] = this.description;
|
||||
} else {
|
||||
// json[r'description'] = null;
|
||||
}
|
||||
json[r'id'] = this.id;
|
||||
json[r'metadata'] = this.metadata;
|
||||
json[r'name'] = this.name;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AlbumGroupResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumGroupResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumGroupResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AlbumGroupResponseDto(
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
metadata: AlbumGroupMetadata.fromJson(json[r'metadata'])!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AlbumGroupResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumGroupResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AlbumGroupResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AlbumGroupResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AlbumGroupResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AlbumGroupResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AlbumGroupResponseDto-objects as value to a dart map
|
||||
static Map<String, List<AlbumGroupResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AlbumGroupResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AlbumGroupResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'description',
|
||||
'id',
|
||||
'metadata',
|
||||
'name',
|
||||
};
|
||||
}
|
||||
|
||||
99
mobile/openapi/lib/model/album_group_update_dto.dart
generated
Normal file
99
mobile/openapi/lib/model/album_group_update_dto.dart
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class AlbumGroupUpdateDto {
|
||||
/// Returns a new [AlbumGroupUpdateDto] instance.
|
||||
AlbumGroupUpdateDto({
|
||||
required this.role,
|
||||
});
|
||||
|
||||
AlbumUserRole role;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupUpdateDto &&
|
||||
other.role == role;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(role.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumGroupUpdateDto[role=$role]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'role'] = this.role;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AlbumGroupUpdateDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumGroupUpdateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumGroupUpdateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AlbumGroupUpdateDto(
|
||||
role: AlbumUserRole.fromJson(json[r'role'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AlbumGroupUpdateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumGroupUpdateDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AlbumGroupUpdateDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AlbumGroupUpdateDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AlbumGroupUpdateDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AlbumGroupUpdateDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AlbumGroupUpdateDto-objects as value to a dart map
|
||||
static Map<String, List<AlbumGroupUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AlbumGroupUpdateDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AlbumGroupUpdateDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'role',
|
||||
};
|
||||
}
|
||||
|
||||
13
mobile/openapi/lib/model/create_album_dto.dart
generated
13
mobile/openapi/lib/model/create_album_dto.dart
generated
@@ -17,6 +17,7 @@ class CreateAlbumDto {
|
||||
this.albumUsers = const [],
|
||||
this.assetIds = const [],
|
||||
this.description,
|
||||
this.groups = const [],
|
||||
});
|
||||
|
||||
String albumName;
|
||||
@@ -33,12 +34,15 @@ class CreateAlbumDto {
|
||||
///
|
||||
String? description;
|
||||
|
||||
List<AlbumGroupDto> groups;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto &&
|
||||
other.albumName == albumName &&
|
||||
_deepEquality.equals(other.albumUsers, albumUsers) &&
|
||||
_deepEquality.equals(other.assetIds, assetIds) &&
|
||||
other.description == description;
|
||||
other.description == description &&
|
||||
_deepEquality.equals(other.groups, groups);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@@ -46,10 +50,11 @@ class CreateAlbumDto {
|
||||
(albumName.hashCode) +
|
||||
(albumUsers.hashCode) +
|
||||
(assetIds.hashCode) +
|
||||
(description == null ? 0 : description!.hashCode);
|
||||
(description == null ? 0 : description!.hashCode) +
|
||||
(groups.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description]';
|
||||
String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description, groups=$groups]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -61,6 +66,7 @@ class CreateAlbumDto {
|
||||
} else {
|
||||
// json[r'description'] = null;
|
||||
}
|
||||
json[r'groups'] = this.groups;
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -79,6 +85,7 @@ class CreateAlbumDto {
|
||||
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
groups: AlbumGroupDto.listFromJson(json[r'groups']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
117
mobile/openapi/lib/model/group_admin_create_dto.dart
generated
Normal file
117
mobile/openapi/lib/model/group_admin_create_dto.dart
generated
Normal file
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupAdminCreateDto {
|
||||
/// Returns a new [GroupAdminCreateDto] instance.
|
||||
GroupAdminCreateDto({
|
||||
this.description,
|
||||
required this.name,
|
||||
this.users = const [],
|
||||
});
|
||||
|
||||
String? description;
|
||||
|
||||
String name;
|
||||
|
||||
List<GroupUserDto> users;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupAdminCreateDto &&
|
||||
other.description == description &&
|
||||
other.name == name &&
|
||||
_deepEquality.equals(other.users, users);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(description == null ? 0 : description!.hashCode) +
|
||||
(name.hashCode) +
|
||||
(users.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupAdminCreateDto[description=$description, name=$name, users=$users]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.description != null) {
|
||||
json[r'description'] = this.description;
|
||||
} else {
|
||||
// json[r'description'] = null;
|
||||
}
|
||||
json[r'name'] = this.name;
|
||||
json[r'users'] = this.users;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupAdminCreateDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupAdminCreateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupAdminCreateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupAdminCreateDto(
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
users: GroupUserDto.listFromJson(json[r'users']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupAdminCreateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupAdminCreateDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupAdminCreateDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupAdminCreateDto> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupAdminCreateDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupAdminCreateDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupAdminCreateDto-objects as value to a dart map
|
||||
static Map<String, List<GroupAdminCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupAdminCreateDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupAdminCreateDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'name',
|
||||
};
|
||||
}
|
||||
|
||||
135
mobile/openapi/lib/model/group_admin_response_dto.dart
generated
Normal file
135
mobile/openapi/lib/model/group_admin_response_dto.dart
generated
Normal file
@@ -0,0 +1,135 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupAdminResponseDto {
|
||||
/// Returns a new [GroupAdminResponseDto] instance.
|
||||
GroupAdminResponseDto({
|
||||
required this.createdAt,
|
||||
required this.description,
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
DateTime createdAt;
|
||||
|
||||
String? description;
|
||||
|
||||
String id;
|
||||
|
||||
String name;
|
||||
|
||||
DateTime updatedAt;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupAdminResponseDto &&
|
||||
other.createdAt == createdAt &&
|
||||
other.description == description &&
|
||||
other.id == id &&
|
||||
other.name == name &&
|
||||
other.updatedAt == updatedAt;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(createdAt.hashCode) +
|
||||
(description == null ? 0 : description!.hashCode) +
|
||||
(id.hashCode) +
|
||||
(name.hashCode) +
|
||||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupAdminResponseDto[createdAt=$createdAt, description=$description, id=$id, name=$name, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
||||
if (this.description != null) {
|
||||
json[r'description'] = this.description;
|
||||
} else {
|
||||
// json[r'description'] = null;
|
||||
}
|
||||
json[r'id'] = this.id;
|
||||
json[r'name'] = this.name;
|
||||
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupAdminResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupAdminResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupAdminResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupAdminResponseDto(
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupAdminResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupAdminResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupAdminResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupAdminResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupAdminResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupAdminResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupAdminResponseDto-objects as value to a dart map
|
||||
static Map<String, List<GroupAdminResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupAdminResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupAdminResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'createdAt',
|
||||
'description',
|
||||
'id',
|
||||
'name',
|
||||
'updatedAt',
|
||||
};
|
||||
}
|
||||
|
||||
119
mobile/openapi/lib/model/group_admin_update_dto.dart
generated
Normal file
119
mobile/openapi/lib/model/group_admin_update_dto.dart
generated
Normal file
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupAdminUpdateDto {
|
||||
/// Returns a new [GroupAdminUpdateDto] instance.
|
||||
GroupAdminUpdateDto({
|
||||
this.description,
|
||||
this.name,
|
||||
});
|
||||
|
||||
String? description;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupAdminUpdateDto &&
|
||||
other.description == description &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(description == null ? 0 : description!.hashCode) +
|
||||
(name == null ? 0 : name!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupAdminUpdateDto[description=$description, name=$name]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.description != null) {
|
||||
json[r'description'] = this.description;
|
||||
} else {
|
||||
// json[r'description'] = null;
|
||||
}
|
||||
if (this.name != null) {
|
||||
json[r'name'] = this.name;
|
||||
} else {
|
||||
// json[r'name'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupAdminUpdateDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupAdminUpdateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupAdminUpdateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupAdminUpdateDto(
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupAdminUpdateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupAdminUpdateDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupAdminUpdateDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupAdminUpdateDto> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupAdminUpdateDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupAdminUpdateDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupAdminUpdateDto-objects as value to a dart map
|
||||
static Map<String, List<GroupAdminUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupAdminUpdateDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupAdminUpdateDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
119
mobile/openapi/lib/model/group_response_dto.dart
generated
Normal file
119
mobile/openapi/lib/model/group_response_dto.dart
generated
Normal file
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupResponseDto {
|
||||
/// Returns a new [GroupResponseDto] instance.
|
||||
GroupResponseDto({
|
||||
required this.description,
|
||||
required this.id,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
String? description;
|
||||
|
||||
String id;
|
||||
|
||||
String name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupResponseDto &&
|
||||
other.description == description &&
|
||||
other.id == id &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(description == null ? 0 : description!.hashCode) +
|
||||
(id.hashCode) +
|
||||
(name.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupResponseDto[description=$description, id=$id, name=$name]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.description != null) {
|
||||
json[r'description'] = this.description;
|
||||
} else {
|
||||
// json[r'description'] = null;
|
||||
}
|
||||
json[r'id'] = this.id;
|
||||
json[r'name'] = this.name;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupResponseDto(
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupResponseDto-objects as value to a dart map
|
||||
static Map<String, List<GroupResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'description',
|
||||
'id',
|
||||
'name',
|
||||
};
|
||||
}
|
||||
|
||||
99
mobile/openapi/lib/model/group_user_create_all_dto.dart
generated
Normal file
99
mobile/openapi/lib/model/group_user_create_all_dto.dart
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupUserCreateAllDto {
|
||||
/// Returns a new [GroupUserCreateAllDto] instance.
|
||||
GroupUserCreateAllDto({
|
||||
this.users = const [],
|
||||
});
|
||||
|
||||
List<GroupUserDto> users;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupUserCreateAllDto &&
|
||||
_deepEquality.equals(other.users, users);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(users.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupUserCreateAllDto[users=$users]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'users'] = this.users;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupUserCreateAllDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupUserCreateAllDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupUserCreateAllDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupUserCreateAllDto(
|
||||
users: GroupUserDto.listFromJson(json[r'users']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupUserCreateAllDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupUserCreateAllDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupUserCreateAllDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupUserCreateAllDto> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupUserCreateAllDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupUserCreateAllDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupUserCreateAllDto-objects as value to a dart map
|
||||
static Map<String, List<GroupUserCreateAllDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupUserCreateAllDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupUserCreateAllDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'users',
|
||||
};
|
||||
}
|
||||
|
||||
101
mobile/openapi/lib/model/group_user_delete_all_dto.dart
generated
Normal file
101
mobile/openapi/lib/model/group_user_delete_all_dto.dart
generated
Normal file
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupUserDeleteAllDto {
|
||||
/// Returns a new [GroupUserDeleteAllDto] instance.
|
||||
GroupUserDeleteAllDto({
|
||||
this.userIds = const [],
|
||||
});
|
||||
|
||||
List<String> userIds;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupUserDeleteAllDto &&
|
||||
_deepEquality.equals(other.userIds, userIds);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(userIds.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupUserDeleteAllDto[userIds=$userIds]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'userIds'] = this.userIds;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupUserDeleteAllDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupUserDeleteAllDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupUserDeleteAllDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupUserDeleteAllDto(
|
||||
userIds: json[r'userIds'] is Iterable
|
||||
? (json[r'userIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupUserDeleteAllDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupUserDeleteAllDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupUserDeleteAllDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupUserDeleteAllDto> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupUserDeleteAllDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupUserDeleteAllDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupUserDeleteAllDto-objects as value to a dart map
|
||||
static Map<String, List<GroupUserDeleteAllDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupUserDeleteAllDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupUserDeleteAllDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'userIds',
|
||||
};
|
||||
}
|
||||
|
||||
99
mobile/openapi/lib/model/group_user_dto.dart
generated
Normal file
99
mobile/openapi/lib/model/group_user_dto.dart
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupUserDto {
|
||||
/// Returns a new [GroupUserDto] instance.
|
||||
GroupUserDto({
|
||||
required this.userId,
|
||||
});
|
||||
|
||||
String userId;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupUserDto &&
|
||||
other.userId == userId;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(userId.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupUserDto[userId=$userId]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'userId'] = this.userId;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupUserDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupUserDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupUserDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupUserDto(
|
||||
userId: mapValueOfType<String>(json, r'userId')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupUserDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupUserDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupUserDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupUserDto> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupUserDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupUserDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupUserDto-objects as value to a dart map
|
||||
static Map<String, List<GroupUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupUserDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupUserDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'userId',
|
||||
};
|
||||
}
|
||||
|
||||
107
mobile/openapi/lib/model/group_user_metadata.dart
generated
Normal file
107
mobile/openapi/lib/model/group_user_metadata.dart
generated
Normal file
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupUserMetadata {
|
||||
/// Returns a new [GroupUserMetadata] instance.
|
||||
GroupUserMetadata({
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
DateTime createdAt;
|
||||
|
||||
DateTime updatedAt;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupUserMetadata &&
|
||||
other.createdAt == createdAt &&
|
||||
other.updatedAt == updatedAt;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(createdAt.hashCode) +
|
||||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupUserMetadata[createdAt=$createdAt, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
||||
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupUserMetadata] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupUserMetadata? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupUserMetadata");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupUserMetadata(
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupUserMetadata> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupUserMetadata>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupUserMetadata.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupUserMetadata> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupUserMetadata>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupUserMetadata.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupUserMetadata-objects as value to a dart map
|
||||
static Map<String, List<GroupUserMetadata>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupUserMetadata>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupUserMetadata.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'createdAt',
|
||||
'updatedAt',
|
||||
};
|
||||
}
|
||||
|
||||
147
mobile/openapi/lib/model/group_user_response_dto.dart
generated
Normal file
147
mobile/openapi/lib/model/group_user_response_dto.dart
generated
Normal file
@@ -0,0 +1,147 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class GroupUserResponseDto {
|
||||
/// Returns a new [GroupUserResponseDto] instance.
|
||||
GroupUserResponseDto({
|
||||
required this.avatarColor,
|
||||
required this.email,
|
||||
required this.id,
|
||||
required this.metadata,
|
||||
required this.name,
|
||||
required this.profileChangedAt,
|
||||
required this.profileImagePath,
|
||||
});
|
||||
|
||||
UserAvatarColor avatarColor;
|
||||
|
||||
String email;
|
||||
|
||||
String id;
|
||||
|
||||
GroupUserMetadata metadata;
|
||||
|
||||
String name;
|
||||
|
||||
DateTime profileChangedAt;
|
||||
|
||||
String profileImagePath;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GroupUserResponseDto &&
|
||||
other.avatarColor == avatarColor &&
|
||||
other.email == email &&
|
||||
other.id == id &&
|
||||
other.metadata == metadata &&
|
||||
other.name == name &&
|
||||
other.profileChangedAt == profileChangedAt &&
|
||||
other.profileImagePath == profileImagePath;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(avatarColor.hashCode) +
|
||||
(email.hashCode) +
|
||||
(id.hashCode) +
|
||||
(metadata.hashCode) +
|
||||
(name.hashCode) +
|
||||
(profileChangedAt.hashCode) +
|
||||
(profileImagePath.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GroupUserResponseDto[avatarColor=$avatarColor, email=$email, id=$id, metadata=$metadata, name=$name, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'avatarColor'] = this.avatarColor;
|
||||
json[r'email'] = this.email;
|
||||
json[r'id'] = this.id;
|
||||
json[r'metadata'] = this.metadata;
|
||||
json[r'name'] = this.name;
|
||||
json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String();
|
||||
json[r'profileImagePath'] = this.profileImagePath;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [GroupUserResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static GroupUserResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "GroupUserResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return GroupUserResponseDto(
|
||||
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!,
|
||||
email: mapValueOfType<String>(json, r'email')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
metadata: GroupUserMetadata.fromJson(json[r'metadata'])!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
|
||||
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<GroupUserResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <GroupUserResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = GroupUserResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, GroupUserResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, GroupUserResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = GroupUserResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of GroupUserResponseDto-objects as value to a dart map
|
||||
static Map<String, List<GroupUserResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<GroupUserResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = GroupUserResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'avatarColor',
|
||||
'email',
|
||||
'id',
|
||||
'metadata',
|
||||
'name',
|
||||
'profileChangedAt',
|
||||
'profileImagePath',
|
||||
};
|
||||
}
|
||||
|
||||
42
mobile/openapi/lib/model/permission.dart
generated
42
mobile/openapi/lib/model/permission.dart
generated
@@ -54,6 +54,10 @@ class Permission {
|
||||
static const albumUserPeriodCreate = Permission._(r'albumUser.create');
|
||||
static const albumUserPeriodUpdate = Permission._(r'albumUser.update');
|
||||
static const albumUserPeriodDelete = Permission._(r'albumUser.delete');
|
||||
static const albumGroupPeriodCreate = Permission._(r'albumGroup.create');
|
||||
static const albumGroupPeriodRead = Permission._(r'albumGroup.read');
|
||||
static const albumGroupPeriodUpdate = Permission._(r'albumGroup.update');
|
||||
static const albumGroupPeriodDelete = Permission._(r'albumGroup.delete');
|
||||
static const authPeriodChangePassword = Permission._(r'auth.changePassword');
|
||||
static const authDevicePeriodDelete = Permission._(r'authDevice.delete');
|
||||
static const archivePeriodRead = Permission._(r'archive.read');
|
||||
@@ -63,6 +67,8 @@ class Permission {
|
||||
static const facePeriodRead = Permission._(r'face.read');
|
||||
static const facePeriodUpdate = Permission._(r'face.update');
|
||||
static const facePeriodDelete = Permission._(r'face.delete');
|
||||
static const groupPeriodRead = Permission._(r'group.read');
|
||||
static const groupPeriodDelete = Permission._(r'group.delete');
|
||||
static const jobPeriodCreate = Permission._(r'job.create');
|
||||
static const jobPeriodRead = Permission._(r'job.read');
|
||||
static const libraryPeriodCreate = Permission._(r'library.create');
|
||||
@@ -145,6 +151,14 @@ class Permission {
|
||||
static const userProfileImagePeriodRead = Permission._(r'userProfileImage.read');
|
||||
static const userProfileImagePeriodUpdate = Permission._(r'userProfileImage.update');
|
||||
static const userProfileImagePeriodDelete = Permission._(r'userProfileImage.delete');
|
||||
static const adminGroupPeriodCreate = Permission._(r'adminGroup.create');
|
||||
static const adminGroupPeriodRead = Permission._(r'adminGroup.read');
|
||||
static const adminGroupPeriodUpdate = Permission._(r'adminGroup.update');
|
||||
static const adminGroupPeriodDelete = Permission._(r'adminGroup.delete');
|
||||
static const adminGroupUserPeriodCreate = Permission._(r'adminGroupUser.create');
|
||||
static const adminGroupUserPeriodRead = Permission._(r'adminGroupUser.read');
|
||||
static const adminGroupUserPeriodUpdate = Permission._(r'adminGroupUser.update');
|
||||
static const adminGroupUserPeriodDelete = Permission._(r'adminGroupUser.delete');
|
||||
static const adminUserPeriodCreate = Permission._(r'adminUser.create');
|
||||
static const adminUserPeriodRead = Permission._(r'adminUser.read');
|
||||
static const adminUserPeriodUpdate = Permission._(r'adminUser.update');
|
||||
@@ -183,6 +197,10 @@ class Permission {
|
||||
albumUserPeriodCreate,
|
||||
albumUserPeriodUpdate,
|
||||
albumUserPeriodDelete,
|
||||
albumGroupPeriodCreate,
|
||||
albumGroupPeriodRead,
|
||||
albumGroupPeriodUpdate,
|
||||
albumGroupPeriodDelete,
|
||||
authPeriodChangePassword,
|
||||
authDevicePeriodDelete,
|
||||
archivePeriodRead,
|
||||
@@ -192,6 +210,8 @@ class Permission {
|
||||
facePeriodRead,
|
||||
facePeriodUpdate,
|
||||
facePeriodDelete,
|
||||
groupPeriodRead,
|
||||
groupPeriodDelete,
|
||||
jobPeriodCreate,
|
||||
jobPeriodRead,
|
||||
libraryPeriodCreate,
|
||||
@@ -274,6 +294,14 @@ class Permission {
|
||||
userProfileImagePeriodRead,
|
||||
userProfileImagePeriodUpdate,
|
||||
userProfileImagePeriodDelete,
|
||||
adminGroupPeriodCreate,
|
||||
adminGroupPeriodRead,
|
||||
adminGroupPeriodUpdate,
|
||||
adminGroupPeriodDelete,
|
||||
adminGroupUserPeriodCreate,
|
||||
adminGroupUserPeriodRead,
|
||||
adminGroupUserPeriodUpdate,
|
||||
adminGroupUserPeriodDelete,
|
||||
adminUserPeriodCreate,
|
||||
adminUserPeriodRead,
|
||||
adminUserPeriodUpdate,
|
||||
@@ -347,6 +375,10 @@ class PermissionTypeTransformer {
|
||||
case r'albumUser.create': return Permission.albumUserPeriodCreate;
|
||||
case r'albumUser.update': return Permission.albumUserPeriodUpdate;
|
||||
case r'albumUser.delete': return Permission.albumUserPeriodDelete;
|
||||
case r'albumGroup.create': return Permission.albumGroupPeriodCreate;
|
||||
case r'albumGroup.read': return Permission.albumGroupPeriodRead;
|
||||
case r'albumGroup.update': return Permission.albumGroupPeriodUpdate;
|
||||
case r'albumGroup.delete': return Permission.albumGroupPeriodDelete;
|
||||
case r'auth.changePassword': return Permission.authPeriodChangePassword;
|
||||
case r'authDevice.delete': return Permission.authDevicePeriodDelete;
|
||||
case r'archive.read': return Permission.archivePeriodRead;
|
||||
@@ -356,6 +388,8 @@ class PermissionTypeTransformer {
|
||||
case r'face.read': return Permission.facePeriodRead;
|
||||
case r'face.update': return Permission.facePeriodUpdate;
|
||||
case r'face.delete': return Permission.facePeriodDelete;
|
||||
case r'group.read': return Permission.groupPeriodRead;
|
||||
case r'group.delete': return Permission.groupPeriodDelete;
|
||||
case r'job.create': return Permission.jobPeriodCreate;
|
||||
case r'job.read': return Permission.jobPeriodRead;
|
||||
case r'library.create': return Permission.libraryPeriodCreate;
|
||||
@@ -438,6 +472,14 @@ class PermissionTypeTransformer {
|
||||
case r'userProfileImage.read': return Permission.userProfileImagePeriodRead;
|
||||
case r'userProfileImage.update': return Permission.userProfileImagePeriodUpdate;
|
||||
case r'userProfileImage.delete': return Permission.userProfileImagePeriodDelete;
|
||||
case r'adminGroup.create': return Permission.adminGroupPeriodCreate;
|
||||
case r'adminGroup.read': return Permission.adminGroupPeriodRead;
|
||||
case r'adminGroup.update': return Permission.adminGroupPeriodUpdate;
|
||||
case r'adminGroup.delete': return Permission.adminGroupPeriodDelete;
|
||||
case r'adminGroupUser.create': return Permission.adminGroupUserPeriodCreate;
|
||||
case r'adminGroupUser.read': return Permission.adminGroupUserPeriodRead;
|
||||
case r'adminGroupUser.update': return Permission.adminGroupUserPeriodUpdate;
|
||||
case r'adminGroupUser.delete': return Permission.adminGroupUserPeriodDelete;
|
||||
case r'adminUser.create': return Permission.adminUserPeriodCreate;
|
||||
case r'adminUser.read': return Permission.adminUserPeriodRead;
|
||||
case r'adminUser.update': return Permission.adminUserPeriodUpdate;
|
||||
|
||||
Reference in New Issue
Block a user