mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 13:57:39 +09:00 
			
		
		
		
	
		
			Some checks are pending
		
		
	
	CodeQL / Analyze (javascript) (push) Waiting to run
				
			CodeQL / Analyze (python) (push) Waiting to run
				
			Docker / pre-job (push) Waiting to run
				
			Docker / Re-Tag ML () (push) Blocked by required conditions
				
			Docker / Re-Tag ML (-armnn) (push) Blocked by required conditions
				
			Docker / Re-Tag ML (-cuda) (push) Blocked by required conditions
				
			Docker / Re-Tag ML (-openvino) (push) Blocked by required conditions
				
			Docker / Re-Tag ML (-rknn) (push) Blocked by required conditions
				
			Docker / Re-Tag ML (-rocm) (push) Blocked by required conditions
				
			Docker / Re-Tag Server () (push) Blocked by required conditions
				
			Docker / Build and Push ML (armnn, linux/arm64, -armnn) (push) Blocked by required conditions
				
			Docker / Build and Push ML (cpu, ) (push) Blocked by required conditions
				
			Docker / Build and Push ML (cuda, linux/amd64, -cuda) (push) Blocked by required conditions
				
			Docker / Build and Push ML (openvino, linux/amd64, -openvino) (push) Blocked by required conditions
				
			Docker / Build and Push ML (rknn, linux/arm64, -rknn) (push) Blocked by required conditions
				
			Docker / Build and Push ML (rocm, linux/amd64, {"linux/amd64": "mich"}, -rocm) (push) Blocked by required conditions
				
			Docker / Build and Push Server (push) Blocked by required conditions
				
			Docker / Docker Build & Push Server Success (push) Blocked by required conditions
				
			Docker / Docker Build & Push ML Success (push) Blocked by required conditions
				
			Docs build / pre-job (push) Waiting to run
				
			Docs build / Docs Build (push) Blocked by required conditions
				
			Static Code Analysis / pre-job (push) Waiting to run
				
			Static Code Analysis / Run Dart Code Analysis (push) Blocked by required conditions
				
			Static Code Analysis / zizmor (push) Waiting to run
				
			Test / pre-job (push) Waiting to run
				
			Test / Test & Lint Server (push) Blocked by required conditions
				
			Test / Unit Test CLI (push) Blocked by required conditions
				
			Test / Unit Test CLI (Windows) (push) Blocked by required conditions
				
			Test / Lint Web (push) Blocked by required conditions
				
			Test / Test Web (push) Blocked by required conditions
				
			Test / Test i18n (push) Blocked by required conditions
				
			Test / End-to-End Lint (push) Blocked by required conditions
				
			Test / Medium Tests (Server) (push) Blocked by required conditions
				
			Test / End-to-End Tests (Server & CLI) (ubuntu-24.04-arm) (push) Blocked by required conditions
				
			Test / End-to-End Tests (Server & CLI) (ubuntu-latest) (push) Blocked by required conditions
				
			Test / End-to-End Tests (Web) (ubuntu-24.04-arm) (push) Blocked by required conditions
				
			Test / End-to-End Tests (Web) (ubuntu-latest) (push) Blocked by required conditions
				
			Test / End-to-End Tests Success (push) Blocked by required conditions
				
			Test / Unit Test Mobile (push) Blocked by required conditions
				
			Test / Unit Test ML (push) Blocked by required conditions
				
			Test / .github Files Formatting (push) Blocked by required conditions
				
			Test / ShellCheck (push) Waiting to run
				
			Test / OpenAPI Clients (push) Waiting to run
				
			Test / SQL Schema Checks (push) Waiting to run
				
			* wip * added user metadata key * wip * restructure onboarding system and add initial locale * update language card and fix translation updating * remove prints * new card formattings * fix cursed unmount effect * add OAuth route onboarding * remove required admin auth for onboarding * delete the hotwire button * update open-api files * delete import * fix failing oauth onboarding fields * fix e2e test * fix web e2e test * add onboarding to user registration e2e test * remove todo this was a holdover during dev and didn't get deleted * fix server small tests * use onDestroy to save settings rather than a bind:this * change to false for isOnboarded * fix other auth small test * provide type annotation in user factory metadata field * remove onboardingCompelted from UserDto * move translations to onboarding steps array and mark as derived so they update * break language selector out into its own component as per @danieldietzler suggestion * remove hello header on card * fix flixkering on server privacy card * label/id fixes * openapi --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
		
			
				
	
	
		
			667 lines
		
	
	
		
			22 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
		
			Generated
		
	
	
			
		
		
	
	
			667 lines
		
	
	
		
			22 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
		
			Generated
		
	
	
| //
 | |
| // 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 UsersApi {
 | |
|   UsersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
 | |
| 
 | |
|   final ApiClient apiClient;
 | |
| 
 | |
|   /// Performs an HTTP 'POST /users/profile-image' operation and returns the [Response].
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [MultipartFile] file (required):
 | |
|   Future<Response> createProfileImageWithHttpInfo(MultipartFile file,) async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/profile-image';
 | |
| 
 | |
|     // ignore: prefer_final_locals
 | |
|     Object? postBody;
 | |
| 
 | |
|     final queryParams = <QueryParam>[];
 | |
|     final headerParams = <String, String>{};
 | |
|     final formParams = <String, String>{};
 | |
| 
 | |
|     const contentTypes = <String>['multipart/form-data'];
 | |
| 
 | |
|     bool hasFields = false;
 | |
|     final mp = MultipartRequest('POST', Uri.parse(apiPath));
 | |
|     if (file != null) {
 | |
|       hasFields = true;
 | |
|       mp.fields[r'file'] = file.field;
 | |
|       mp.files.add(file);
 | |
|     }
 | |
|     if (hasFields) {
 | |
|       postBody = mp;
 | |
|     }
 | |
| 
 | |
|     return apiClient.invokeAPI(
 | |
|       apiPath,
 | |
|       'POST',
 | |
|       queryParams,
 | |
|       postBody,
 | |
|       headerParams,
 | |
|       formParams,
 | |
|       contentTypes.isEmpty ? null : contentTypes.first,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [MultipartFile] file (required):
 | |
|   Future<CreateProfileImageResponseDto?> createProfileImage(MultipartFile file,) async {
 | |
|     final response = await createProfileImageWithHttpInfo(file,);
 | |
|     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), 'CreateProfileImageResponseDto',) as CreateProfileImageResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'DELETE /users/profile-image' operation and returns the [Response].
 | |
|   Future<Response> deleteProfileImageWithHttpInfo() async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/profile-image';
 | |
| 
 | |
|     // 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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   Future<void> deleteProfileImage() async {
 | |
|     final response = await deleteProfileImageWithHttpInfo();
 | |
|     if (response.statusCode >= HttpStatus.badRequest) {
 | |
|       throw ApiException(response.statusCode, await _decodeBodyBytes(response));
 | |
|     }
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'DELETE /users/me/license' operation and returns the [Response].
 | |
|   Future<Response> deleteUserLicenseWithHttpInfo() async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me/license';
 | |
| 
 | |
|     // 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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   Future<void> deleteUserLicense() async {
 | |
|     final response = await deleteUserLicenseWithHttpInfo();
 | |
|     if (response.statusCode >= HttpStatus.badRequest) {
 | |
|       throw ApiException(response.statusCode, await _decodeBodyBytes(response));
 | |
|     }
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'DELETE /users/me/onboarding' operation and returns the [Response].
 | |
|   Future<Response> deleteUserOnboardingWithHttpInfo() async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me/onboarding';
 | |
| 
 | |
|     // 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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   Future<void> deleteUserOnboarding() async {
 | |
|     final response = await deleteUserOnboardingWithHttpInfo();
 | |
|     if (response.statusCode >= HttpStatus.badRequest) {
 | |
|       throw ApiException(response.statusCode, await _decodeBodyBytes(response));
 | |
|     }
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'GET /users/me/preferences' operation and returns the [Response].
 | |
|   Future<Response> getMyPreferencesWithHttpInfo() async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me/preferences';
 | |
| 
 | |
|     // 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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   Future<UserPreferencesResponseDto?> getMyPreferences() async {
 | |
|     final response = await getMyPreferencesWithHttpInfo();
 | |
|     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), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'GET /users/me' operation and returns the [Response].
 | |
|   Future<Response> getMyUserWithHttpInfo() async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me';
 | |
| 
 | |
|     // 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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   Future<UserAdminResponseDto?> getMyUser() async {
 | |
|     final response = await getMyUserWithHttpInfo();
 | |
|     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), 'UserAdminResponseDto',) as UserAdminResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'GET /users/{id}/profile-image' operation and returns the [Response].
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [String] id (required):
 | |
|   Future<Response> getProfileImageWithHttpInfo(String id,) async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/{id}/profile-image'
 | |
|       .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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [String] id (required):
 | |
|   Future<MultipartFile?> getProfileImage(String id,) async {
 | |
|     final response = await getProfileImageWithHttpInfo(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), 'MultipartFile',) as MultipartFile;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'GET /users/{id}' operation and returns the [Response].
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [String] id (required):
 | |
|   Future<Response> getUserWithHttpInfo(String id,) async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/{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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [String] id (required):
 | |
|   Future<UserResponseDto?> getUser(String id,) async {
 | |
|     final response = await getUserWithHttpInfo(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), 'UserResponseDto',) as UserResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'GET /users/me/license' operation and returns the [Response].
 | |
|   Future<Response> getUserLicenseWithHttpInfo() async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me/license';
 | |
| 
 | |
|     // 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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   Future<LicenseResponseDto?> getUserLicense() async {
 | |
|     final response = await getUserLicenseWithHttpInfo();
 | |
|     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), 'LicenseResponseDto',) as LicenseResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'GET /users/me/onboarding' operation and returns the [Response].
 | |
|   Future<Response> getUserOnboardingWithHttpInfo() async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me/onboarding';
 | |
| 
 | |
|     // 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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   Future<OnboardingResponseDto?> getUserOnboarding() async {
 | |
|     final response = await getUserOnboardingWithHttpInfo();
 | |
|     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), 'OnboardingResponseDto',) as OnboardingResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'GET /users' operation and returns the [Response].
 | |
|   Future<Response> searchUsersWithHttpInfo() async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users';
 | |
| 
 | |
|     // 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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   Future<List<UserResponseDto>?> searchUsers() async {
 | |
|     final response = await searchUsersWithHttpInfo();
 | |
|     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<UserResponseDto>') as List)
 | |
|         .cast<UserResponseDto>()
 | |
|         .toList(growable: false);
 | |
| 
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'PUT /users/me/license' operation and returns the [Response].
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [LicenseKeyDto] licenseKeyDto (required):
 | |
|   Future<Response> setUserLicenseWithHttpInfo(LicenseKeyDto licenseKeyDto,) async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me/license';
 | |
| 
 | |
|     // ignore: prefer_final_locals
 | |
|     Object? postBody = licenseKeyDto;
 | |
| 
 | |
|     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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [LicenseKeyDto] licenseKeyDto (required):
 | |
|   Future<LicenseResponseDto?> setUserLicense(LicenseKeyDto licenseKeyDto,) async {
 | |
|     final response = await setUserLicenseWithHttpInfo(licenseKeyDto,);
 | |
|     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), 'LicenseResponseDto',) as LicenseResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'PUT /users/me/onboarding' operation and returns the [Response].
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [OnboardingDto] onboardingDto (required):
 | |
|   Future<Response> setUserOnboardingWithHttpInfo(OnboardingDto onboardingDto,) async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me/onboarding';
 | |
| 
 | |
|     // ignore: prefer_final_locals
 | |
|     Object? postBody = onboardingDto;
 | |
| 
 | |
|     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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [OnboardingDto] onboardingDto (required):
 | |
|   Future<OnboardingResponseDto?> setUserOnboarding(OnboardingDto onboardingDto,) async {
 | |
|     final response = await setUserOnboardingWithHttpInfo(onboardingDto,);
 | |
|     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), 'OnboardingResponseDto',) as OnboardingResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'PUT /users/me/preferences' operation and returns the [Response].
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required):
 | |
|   Future<Response> updateMyPreferencesWithHttpInfo(UserPreferencesUpdateDto userPreferencesUpdateDto,) async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me/preferences';
 | |
| 
 | |
|     // ignore: prefer_final_locals
 | |
|     Object? postBody = userPreferencesUpdateDto;
 | |
| 
 | |
|     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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required):
 | |
|   Future<UserPreferencesResponseDto?> updateMyPreferences(UserPreferencesUpdateDto userPreferencesUpdateDto,) async {
 | |
|     final response = await updateMyPreferencesWithHttpInfo(userPreferencesUpdateDto,);
 | |
|     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), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| 
 | |
|   /// Performs an HTTP 'PUT /users/me' operation and returns the [Response].
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [UserUpdateMeDto] userUpdateMeDto (required):
 | |
|   Future<Response> updateMyUserWithHttpInfo(UserUpdateMeDto userUpdateMeDto,) async {
 | |
|     // ignore: prefer_const_declarations
 | |
|     final apiPath = r'/users/me';
 | |
| 
 | |
|     // ignore: prefer_final_locals
 | |
|     Object? postBody = userUpdateMeDto;
 | |
| 
 | |
|     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,
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   /// Parameters:
 | |
|   ///
 | |
|   /// * [UserUpdateMeDto] userUpdateMeDto (required):
 | |
|   Future<UserAdminResponseDto?> updateMyUser(UserUpdateMeDto userUpdateMeDto,) async {
 | |
|     final response = await updateMyUserWithHttpInfo(userUpdateMeDto,);
 | |
|     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), 'UserAdminResponseDto',) as UserAdminResponseDto;
 | |
|     
 | |
|     }
 | |
|     return null;
 | |
|   }
 | |
| }
 |